AIR Desktop App vs. Mac App Store

Hi all,

I need some support please!

I’ve been developing Apps with Flash/Animate + AIR for quite some time for iOS, Android and macOS. My workaround used to work quit well with Animate 2018 + AIR 28/29 on my old MacBook and I was able to submit and publish mac apps on the Mac App Store.

Lately my old mac died so I had to move on to a new one. Now, on macOS 10.15.4 I’m no longer able to use my old workaround as Animate 2018 stopped working - also I guess I should use the latest AIR Versions. :wink:

At the moment I’m stuck updating the macOS Apps as I’m getting Error messages after packaging the published .app file into an .pgk file.

Can anyone please take a look at what I did until now - as I have now clue at all why it stopped working - my developer skills in this final part are not that good.

These are my new working conditions:

  • MacBook Pro 16“ macOS 10.15.4
  • Adobe Animate 20.0.2 Build 22168
  • AIR 33.1.1.68

For example I published my BasicSportsTimer.app from Animate - and it’s working fine!

Then I used to take the following steps from my old workaraound:

1.) I opened the Package Content of the BasicSportsTimer.app and removed these files from the Versions folder:

  • Adobe CP
  • Flash Plugin
  • WebKit

2.) I opened the Info.plist file, added these 4 lines

<key>CFBundleVersion</key>
<string>1.0.0</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.sports</string>

… and dropped the Info.plist into a MacProcess folder on my desktop.

3.) I also put the Icon.icns file into the MacProcess folder.

4.) I added a entitlement.plist to the MacProcess folder with this content:

<?xml version=”1.0″ encoding=”utf-8″?>
<plist version=”1.0″>
<dict>
<key>com.apple.security.app-sandbox</key>
<true/>
<key>com.apple.security.files.user-selected.read-write</key>
<true/>
</dict>
</plist>

5.) I opened Terminal and added these lines:

cd /Users/myname/Desktop
cp MacProcess/Info.plist BasicSportsTimer.app /Contents/Info.plist
cp MacProcess/Icon.icns BasicSportsTimer.app /Contents/Resources/Icon.icns
chmod -R 777 BasicSportsTimer.app

codesign -f -v -s "3rd Party Mac Developer Application: Developer Name (XXXXXXXXXX)" BasicSportsTimer.app/Contents/Frameworks/Adobe\ AIR.framework/Versions/Current/Adobe\ AIR_64\ Helper
codesign -f -v -s "3rd Party Mac Developer Application: Developer Name (XXXXXXXXXX)" BasicSportsTimer.app/Contents/Frameworks/Adobe\ AIR.framework/Versions/Current/Adobe\ AIR_64
codesign -f -v -s "3rd Party Mac Developer Application: Developer Name (XXXXXXXXXX)" BasicSportsTimer.app/Contents/Frameworks/Adobe\ AIR.framework/Versions/Current/Adobe\ AIR
codesign -f -v -s "3rd Party Mac Developer Application: Developer Name (XXXXXXXXXX)" BasicSportsTimer.app/Contents/MacOS/Basic\ Sports\ Timer
codesign -f -v -s "3rd Party Mac Developer Application: Developer Name (XXXXXXXXXX)" BasicSportsTimer.app
codesign -f -v -s "3rd Party Mac Developer Application: Developer Name (XXXXXXXXXX)" --entitlements MacProcess/entitlement.plist BasicSportsTimer.app
codesign --display --entitlements - BasicSportsTimer.app
productbuild --component BasicSportsTimer.app /Applications BasicInstaller.pkg --sign "3rd Party Mac Developer Installer: Developer Name (XXXXXXXXXX)"

… normally I used to get a .pkg file. I was able to install my Timer App using this .pkg file to my Mac (and it was working fine!!) and I was able to successfully submit the app (.pkg) to Apple.

Now - I’m able to install the Timer.app from the .pkg file I created above, but the App won’t open anymore. I’m just getting an error message saying:

„Timer app has ended unexpectedly“


… plus I’m getting this report:
Process: Basic Sports Timer [5177]
Path: /Users/USER/Desktop/BasicSportsTimer 12.53.40.app/Contents/MacOS/Basic Sports Timer
Identifier: com.essig.osx.basictimer
Version: ???
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: Basic Sports Timer [5177]
User ID: 501

Date/Time:             2020-04-14 13:18:18.341 +0200
OS Version:            Mac OS X 10.15.4 (19E287)
Report Version:        12
Bridge OS Version:     4.4 (17P4281)
Anonymous UUID:        2CD4C39E-8199-590F-1701-30FFD2B5A6E8

Sleep/Wake UUID:       2BFB6965-7EA3-4D92-B8FC-7BAAFF8DB206

Time Awake Since Boot: 23000 seconds
Time Since Wake:       2400 seconds

System Integrity Protection: enabled

Crashed Thread:        0

Exception Type:        EXC_CRASH (Code Signature Invalid)
Exception Codes:       0x0000000000000000, 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY

Termination Reason:    Namespace CODESIGNING, Code 0x1

kernel messages:

VM Regions Near 0 (cr2):
--> 
    __TEXT                 0000000104b33000-0000000104b39000 [   24K] r-x/r-x SM=COW  

Thread 0 Crashed:
0   ???                           	0x0000000105921000 _dyld_start + 0

Thread 0 crashed with X86 Thread State (64-bit):
  rax: 0x0000000000000000  rbx: 0x0000000000000000  rcx: 0x0000000000000000  rdx: 0x0000000000000000
  rdi: 0x0000000000000000  rsi: 0x0000000000000000  rbp: 0x0000000000000000  rsp: 0x00007ffeeb0ccbc8
   r8: 0x0000000000000000   r9: 0x0000000000000000  r10: 0x0000000000000000  r11: 0x0000000000000000
  r12: 0x0000000000000000  r13: 0x0000000000000000  r14: 0x0000000000000000  r15: 0x0000000000000000
  rip: 0x0000000105921000  rfl: 0x0000000000000200  cr2: 0x0000000000000000
  
Logical CPU:     0
Error Code:      0x00000000
Trap Number:     0


Binary Images:
       0x104b33000 -        0x104b38fff +??? (???) <8A08FAF5-4829-3C0F-ACAF-B811BA7CC77D> (null)
       0x105920000 -        0x1059b1eff +??? (750.5) <1F893B81-89A5-3502-8510-95B97B9F730D> (null)

External Modification Summary:
  Calls made by other processes targeting this process:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0
  Calls made by this process:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0
  Calls made by all processes on this machine:
    task_for_pid: 16783
    thread_create: 0
    thread_set_state: 0

VM Region Summary:
ReadOnly portion of Libraries: Total=856K resident=0K(0%) swapped_out_or_unallocated=856K(100%)
Writable regions: Total=8404K written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=8404K(100%)
 
                                VIRTUAL   REGION 
REGION TYPE                        SIZE    COUNT (non-coalesced) 
===========                     =======  ======= 
STACK GUARD                       56.0M        1 
Stack                             8192K        1 
__DATA                             220K        3 
__DATA_CONST                        20K        1 
__LINKEDIT                         248K        2 
__TEXT                             608K        2 
shared memory                        8K        2 
===========                     =======  ======= 
TOTAL                             65.1M       12 

Model: MacBookPro16,1, BootROM 1037.100.362.0.0 (iBridge: 17.16.14281.0.0,0), 8 processors, 8-Core Intel Core i9, 2,4 GHz, 32 GB, SMC 
Graphics: kHW_IntelUHDGraphics630Item, Intel UHD Graphics 630, spdisplays_builtin
Graphics: kHW_AMDRadeonPro5500MItem, AMD Radeon Pro 5500M, spdisplays_pcie_device, 8 GB
Memory Module: BANK 0/ChannelA-DIMM0, 16 GB, DDR4, 2667 MHz, SK Hynix, -
Memory Module: BANK 2/ChannelB-DIMM0, 16 GB, DDR4, 2667 MHz, SK Hynix, -
AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x7BF), wl0: Feb 28 2020 15:31:53 version 9.30.357.35.32.5.47 FWID 01-29ff5c69
Bluetooth: Version 7.0.4f6, 3 services, 27 devices, 1 incoming serial ports
Network Service: Wi-Fi, AirPort, en0
USB Device: USB3.0 Hub
USB Device: USB3.0 Card Reader
USB Device: USB 3.1 Bus
USB Device: USB2.0 Hub
USB Device: USB2.0 Hub
USB Device: Keyboard Hub
USB Device: Apple Keyboard
USB Device: USB <-> Serial Cable
USB Device: USB3.0 Card Reader
USB Device: USB Billboard Device
USB Device: Apple T2 Bus
USB Device: Composite Device
USB Device: Touch Bar Backlight
USB Device: Touch Bar Display
USB Device: Apple Internal Keyboard / Trackpad
USB Device: Headset
USB Device: Ambient Light Sensor
USB Device: FaceTime HD Camera (Built-in)
USB Device: Apple T2 Controller
Thunderbolt Bus: MacBook Pro, Apple Inc., 55.3
Thunderbolt Bus: MacBook Pro, Apple Inc., 55.3

… however I tried to submit the .pkg file via the old Application Loader and it showed this message:

ERROR ITMS-90296: “App sandbox not enabled. The following executables must include the “com.apple.security.app-sandbox” entitlement with a Boolean value of true in the entitlements property list: [( “com.essig.osx.basictimer.pkg/Payload/BasicSportsTimer.app/Contents/Frameworks/Adobe AIR.framework/Versions/1.0/Resources/A2712Enabler” )] Refer to App Sandbox page at https://developer.apple.com/documentation/security/app_sandbox for more information on sandboxing your app.”

If anyone could give me some hints it would be awesome!! I’ve been searching the internet for days now without success - didn’t find anything - not even an official Tutorial / Instruction by HARMAN / Adobe on how to get Apps to the stores…

So any help would be great! Thank you in advance!

Best regards and have a nice week

Jan

You may wish to have a look at what I put together here.

Code signature error:
Code Signature invalid error is expected if you try and run your store app on your mac without uploading it.
See https://developer.apple.com/library/archive/qa/qa1884/_index.html

Sandbox error
You are only setting entitlements on your main binary. (My scripts handle ‘child’ entitlements also)

2 Likes

Hi tuarua,

WOW - thank you very much! This really looks awesome - and it (almost) worked perfectly. :slight_smile:

As I’m more of a Designer than a developer I hope you don’t mind me asking 1 or 2 more questions.

At the very end Terminal shows an error (?) and I also get an Error message when trying to submit the .pkg file to Apple (see Questions below).

This is what I did so far:

  • I downloaded your mac_installer folder to my desktop

  • I created a folder called „ example-desktop-complete“ on my desktop. Then I created another folder called „ bin-release“ inside the previous folder and dropped my BasicSportsTimer.app into the „ bin-release“ folder.

  • I replaced your icon-1024.png with my BasicSpoortsTimer Icon

  • Now I opened the sign_store.sh file and changed some of the lines from 7-20 to:

APP="BasicSportsTimer"
TEAM_ID="XXXXXXXXXX" ( <—my Team ID )

APP_CATEGORY="public.app-category.sports"

APP_KEY="3rd Party Mac Developer Application: Developer Name (XXXXXXXXXX)" ( <— my Dev Name & Team ID )
INSTALLER_KEY="3rd Party Mac Developer Installer: Developer Name (XXXXXXXXXX)" ( <— my Dev Name & Team ID )

PROVISION_PROFILE="AppStoreDeveloper.provisionprofile"
TWO_FAC_UN=„myname@mydomain.com"
TWO_FAC_PW=„xxxx-xxxx-xxxx-xxxx“
  • I downloaded the provisioning profile of my Timer App, renamed it from BasicSports_Timer.provisionprofile to AppStoreDeveloper.provisionprofile and draped it into your mac_installer folder

  • Then I opened terminal and entered this code:
    cd /Users/myname/Desktop/mac_installer

  • ENTER - then this:
    bash sign_store.sh

Here is the Terminal output:

Last login: Wed Apr 15 10:58:56 on ttys000
myname@MacBook-Pro-2 ~ % cd /Users/myname/Desktop/mac_installer
myname@MacBook-Pro-2 mac_installer % bash sign_store.sh
 Check Tools Availability 
 Copying BasicSportsTimer.app 
 Making icons... 
 Cleaning up unneeded AIR files 
rm: BasicSportsTimer.app/Contents/Frameworks/Adobe AIR.framework/Versions/1.0/Resources/__MACOSX: No such file or directory
 Fixing Info.plist entries 
Add: ":LSApplicationCategoryType" Entry Already Exists
Add: ":CFBundleVersion" Entry Already Exists
 Applying values to Entitlements 
 Embedding Provisioning Profile 
 Signing... 
 Verify codesign 
 Codesign OK 
 Building .pkg 
 Validate app... 
 Validation failed: 1 

Questions:

  • Why did the validation fail? Any ideas?

  • What is the sign_developerId.sh file for? I’m asking, because I was able to install my Timer app using your .pkg file to my Mac and it was working perfectly!!

  • When I tried to submit the .pkg file to Apple I received this Error message:

ERROR ITMS-90236: “Missing required icon. The application bundle does not contain an icon in ICNS format, containing both a 512x512 and a 512x512@2x image. For further assistance, see the Apple Human Interface Guidelines at https://developer.apple.com/macos/human-interface-guidelines/icons-and-images/app-icon

Best regards ans thank you, very, very, veery, very much!! :slight_smile:

Jan

Same reason as in the error panel you posted. There are missing icons. It’s important the .app file you are giving to the script is unaltered. Don’t modify Info.plist, don’t sign anything, don’t overwrite the icons file. Build a fresh .app and let the script do the work.

This script produces a “notarized” pkg. that is an app which is distributed not in the app store but by a developer themselves.
https://developer.apple.com/documentation/xcode/notarizing_macos_software_before_distribution

1 Like

Thanks a lot for the reply!!
But … that’s exactly what I did. I just dropped a freshly published version of the BasicSportsTimer.app (without any modifications (not in the info.plist, not in the package, no Icon changes, nothing at all - just the file Animate published)) to the bin-release folder, put the code into Terminal and hit ENTER (just a few seconds ago) - with the same result.

Last login: Wed Apr 15 15:40:32 on ttys000
myname@MacBook-Pro-2 ~ % cd /Users/myname/Desktop/mac_installer
myname@MacBook-Pro-2 mac_installer % bash sign_store.sh
 Check Tools Availability 
 Copying BasicSportsTimer.app 
 Making icons... 
 Cleaning up unneeded AIR files 
rm: BasicSportsTimer.app/Contents/Frameworks/Adobe AIR.framework/Versions/1.0/Resources/__MACOSX: No such file or directory
 Fixing Info.plist entries 
 Applying values to Entitlements 
 Embedding Provisioning Profile 
 Signing... 
 Verify codesign 
 Codesign OK 
 Building .pkg 
 Validate app... 
 Validation failed: 1 

This is the content of the mac_installer folder after that:

I just checked the last 3 Icons in this folder with quick view and Photoshop

  • icon_256x256@2x.png
  • icon_512x512.png
  • icon_512x512@2x.png
    and somehow they all have the exact same size --> 512x512px.
    Maybe that’s the problem - you can take a look at it here.

Aha - ok - thanks a lot for the clearification !! :slight_smile:

your icon-1024.png base file is not 1024x1024px is it?
Looks like it is 512x512

Also, make sure every time you want to run the script you have to re-export the app from Animate

2 Likes

Good morning tuarua,
oh dear - shame on my. Yes, that was the issue! Now everything worked perfect!!
Thanks a lot your your support - GREAT WORK!!
Best regards - Thank you, thank you, thank you!!! :slight_smile:
Jan

A post was split to a new topic: Publish AIR app to the app store

Hi guys, thanks for posting this guide and glad it’s still possible to publish to Air Desktop apps.

Besides the technicalities, can anyone making Desktop apps answer these questions:

  1. Can you use Apple’s free certificates to make a professionally signed Cert?

  2. After all this work, can anyone tell me if it’s worth doing in terms of sales? Do you get many paid downloads on Desktop?

Thanks,
Matt

2 Likes