fvarrui / JavaPackager

:package: Gradle/Maven plugin to package Java applications as native Windows, MacOS, or Linux executables and create installers for them.
GNU General Public License v3.0
1.07k stars 133 forks source link

CFBundleIdentifier Collision #222

Closed kerner1000 closed 2 years ago

kerner1000 commented 2 years ago

I'm submitting a…

Short description of the issue/suggestion:

When uploading to the AppStore, I get the following errors:

ITMS-90511: CFBundleIdentifier Collision - The Info.plist CFBundleIdentifier value 'net.java.openjdk.java' of 'java' is already in use by another application.

ITMS-90511: CFBundleIdentifier Collision - The Info.plist CFBundleIdentifier value 'net.java.openjdk.jwebserver' of 'jwebserver' is already in use by another application.

ITMS-90511: CFBundleIdentifier Collision - The Info.plist CFBundleIdentifier value 'net.java.openjdk.keytool' of 'keytool' is already in use by another application.

Can I set the CFBundleIdentifier for those elements somewhere in the configuration?

kerner1000 commented 2 years ago

I solved this by using a dedicated JRE and hex-editing the embedded Info.plist inside the java executable (deleted the other ones).

fvarrui commented 2 years ago

Hi @kerner1000! Have you tried with a generated JRE by JavaPackager? Just setting bundleJre=true and ommiting jrePath

kerner1000 commented 2 years ago

Thanks for the hint! When I do so, I get two errors: 1) Could not find or load main class com.kerner1000.myapp.Launcher (like in the other issue) 2) And, when I try to upload to app store, it says: Bad Bundle Executable. You must include a valid CFBundleExecutable key in your bundle's information property list file.";

fvarrui commented 2 years ago

Ok, I'm researching about point 1.

And with point 2, I'm not sure if when you bundle a plugin with your app (a jre in this case), it should have its own Info.plist file.

I suppose you are the first developer trying to upload an app packaged with JavaPackager to the AppStore, so you are finding all possible issues. 😮

kerner1000 commented 2 years ago

Yes, this was also the other problem, a bundled Java executable has an embedded Info.plist. Maybe this is related here..

kerner1000 commented 2 years ago

I suppose you are the first developer trying to upload an app packaged with JavaPackager to the AppStore, so you are finding all possible issues. 😮

Maybe :) it's fine, I already did it once yesterday, unfortunately it doesn't start 😂

With your help we will figure all issues out ;)