Other Publish Java App to Mac Store

JanPRO

Well-Known Member
Licensed User
Longtime User
Hi,

since some days I am trying to create a signed paket installer with javapackager to publish my Java App in the Mac Store. This is, what I have done so far:

1. I have requested the certificate for the app and the installer and added them to the keychain
2. create the icon file
3. create the entitlements file (it’s just a test app, so only sanbox):
B4X:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
    <dict>
        <key>com.apple.security.app-sandbox</key>
        <true/>
    </dict>
</plist>

4. create PKG:
B4X:
javapackager -deploy -srcFiles Test.jar -native mac.appStore -BsystemWide=true -title Titel -name Name -outdir /Users/mac/Desktop/ -outfile temp -BappVersion=1.0.0 -appclass app.example.main -Bidentifier=app.example.main -Bicon=/Users/mac/Desktop/App.icns -Bmac.app-store-entitlements=App.entitlements -Bmac.category=public.app-category.business

So far, so good ...

The task proceeds without problems, but when I try to upload the PKG file via Application Loader, I get the following error messages:

  • ERROR ITMS-90511: "CFBundleIdentifier Collision. The Info.plist CFBundleIdentifier value 'com.oracle.java.8u131.jdk' of 'Name.app/Contents/PlugIns/Java.runtime' is already in use by another application."

  • 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: [( "app.example.main.pkg/Payload/Name.app/Contents/MacOS/Name", "app.example.main.pkg/Payload/Name.app/Contents/PlugIns/Java.runtime/Contents/Home/jre/lib/jspawnhelper" )] Refer to App Sandbox page at .apple.com/devcenter/mac/app-sandbox/ for more information on sandboxing your app."
The first error was easy to fix: I have just edited the bundle identifier in the plist to a unique one. According to this video javapackager handles the whole sign process automatically. I have no influcence on this, so I am not sure what to do here ...

I generell there are not that much information on this topic, this is what I have found so far:
Maybe anybody has experienced similar problems and can help me.

Thank you.

Jan



Btw.: I have posted this question also on stackoverflow four days ago. I will synchronize both threads when I get a new hint or even the solution.
 

JanPRO

Well-Known Member
Licensed User
Longtime User
Hi,

the biggest difference between the Ensemble8 app and mine is the location of the java runtime: Ensemble8 only has got the lib folder but mine has a bunch of more files like a extra Info.plist or extra dynmaic libraries.

But I have no influence on how javapackager structures the app, so I have no clue what to do now, any idea?

Jan
 
Upvote 0

JanPRO

Well-Known Member
Licensed User
Longtime User
Finally I was able to upload my App to iTunes Connect. It seems that my certificates were not valid.
I will check if Apple accepts my App and will post a tutorial soon.

Jan
 
Upvote 0
Top