You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@flex.apache.org by "Erik J. Thomas" <er...@linqto.com> on 2018/08/09 16:04:12 UTC

Desktop AIR Signing Woes

Hey all:

Using IntelliJ-IDEA 2018 to create a Desktop AIR app, the app works great running and debugging from IntelliJ. But trying to package it as a native installer (DMG), it won't sign. I keep getting this error:

"Unable to build a valid certificate chain for the signer."

I generated a MacOS application certificate on the apple developer site, installed it into my keychain, and exported it and the private key to a p12, and provided that in IntelliJ module AIR Package -> Keystore file an unchecked "Use self-signed certificate", then chose Build -> Package AIR Application and chose native installer because I am packaging an ANE and you can't do that if you package an AIR file. It has to be a native package.

Things I've tried include selecting the application certificate as well as the Apple Worldwide Developer Relations Certification Authority and the Developer ID Certification Authority (as mentioned on the Apple Developer site) and exported the combined certificates as p12, but that fails with the same error. I've exhausted all the resources on the web, reading everything and not finding answers.

I've also generated a 3rd Party Mac Developer Installer certificate, and tried using that but I get a different error in that case:

"Failed to package AIR application desktop-sandbox.dmg: not an X509 code-signing certificate"

My ADT command line:

/Applications/IntelliJ IDEA.app/Contents/jdk/Contents/Home/jre/bin/java -Dapplication.home=/Users/ethomas/linqto/FlexSDKs/SDK4.16.1-29a -Dfile.encoding=UTF-8 -Djava.awt.headless=true -Duser.language=en -Duser.region=en -Xmx1024m -jar /Users/ethomas/linqto/FlexSDKs/SDK4.16.1-29a/lib/adt.jar -package -storetype PKCS12 -keystore /Users/ethomas/linqto/FlexDev/certs/MacOSInstallerCert.p12 -target native /Users/ethomas/linqto/FlexDev/navcon/out/production/desktop-sandbox/desktop-sandbox.dmg /Users/ethomas/linqto/FlexDev/navcon/out/production/desktop-sandbox/desktop-sandbox-app.xml -extdir /Users/ethomas/linqto/FlexDev/EventANE -C /Users/ethomas/linqto/FlexDev/navcon/out/production/desktop-sandbox Main.swf

Any ideas?

Thanks!

Re: Desktop AIR Signing Woes

Posted by Erik Thomas <er...@icloud.com>.
Thanks Bill:

The confusion on my part was thinking I could use a MacOS application code-signing certificate from the Apple Developer program to sign a Desktop AIR app for MacOS--but it appears you cannot! 

All instructions I've found from Adobe and the many stack overflow and other forum posts never mention this, they just say that you can code-sign with any code-signing cert from a certificate authority, and of course Apple is a CA, but their cert won't sign an AIR app for MacOS. Weird but apparently true.

We've since ordered a code-signing certificate especially for AIR desktop apps for Windows and MacOS from DigiCert ($200!) which is supposed to work, but I haven't received it yet. They are taking their time verifying our identity. Hopefully I'll have it this week and I will post the solution once I get it working.

Also, found a couple things others may find valuable if porting a mobile to Desktop AIR:

It is possible to reuse AS libraries that reference ANEs for mobile in the desktop project, there's a trick but it works even if the ANE doesn't work on desktop. This makes it easy to just reuse the same codebase for mobile and desktop.
If you use StyleableStageText in a mobile project, you cannot reuse that code on desktop unless you add mobilecomponents.swc as an external library dependency.

With these two points, I am sharing 98% of my mobile app's codebase with the desktop project just using shared libraries. Took a bit of effort to figure these things out but it's awesome to get desktop almost for free, except for these dumb code-signing issues.

Cheers,

Erik

On Aug 21, 2018, at 10:45 AM, bilbosax <wa...@comcast.net> wrote:

Erik, I don't know a lot about these things, but this is one I think I would
send over to the Adobe AIR forums.  They seem to have their hands more on
the mechanics of compiling and packaging than I think the guys over here at
Flex probably do.

Just a thought.



--
Sent from: http://apache-flex-users.2333346.n4.nabble.com/



Re: Desktop AIR Signing Woes

Posted by bilbosax <wa...@comcast.net>.
Erik, I don't know a lot about these things, but this is one I think I would
send over to the Adobe AIR forums.  They seem to have their hands more on
the mechanics of compiling and packaging than I think the guys over here at
Flex probably do.

Just a thought.



--
Sent from: http://apache-flex-users.2333346.n4.nabble.com/