Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java - error when submitting app to Mac Store (deprecated API usage)

I tried to submit Java app to mac store (of course JRE is bundled), but got famous "Invalid Binary Error". In the email from iTunes I got message that "Apple no longer accepts submissions of apps that use Quick Time APIs". That probably means that the bundled JRE points to QTKit Framework or QuickTime Framework. I checked and this API is no longer supported in MAC OS X 10.9.

I use Java 1.7.40.

Do have somebody idea where do Java reference these frameworks and if it is possible to remove those binaries ? I think this is quite fresh problem and I hope there is solution for that.

Thanks, Lubos

like image 986
Lubos Avatar asked Nov 28 '25 18:11

Lubos


1 Answers

I resolved the issue faster as I expected. Here are some details.

Run Unix command otool -L over directory of bundled JRE to find all *dylib files. This will list all the references of all the dylib files. Then you just need to search in the results the string "QTKit". In the case of java 1.7.40, there are 2 libraries, referencing that Framework:

libgstplugins-lite.dylib, libjfxmedia.dylib

If your application doesn't use them, you're lucky and just remove them.

Unix command Example:

otool -L /Library/Java/JavaVirtualMachines/jdk1.7.0_40.jdk/Contents/Home/jre/lib/*dylib

Hopefully this will help guys, who want to submit Java app to Mac store after GTKit.framework was deprecated in OS X 10.9.

Note: this is valid for Java 1.7.40, it might be that for new java versions, this is already fixed.

Regards,

Lubos

like image 155
Lubos Avatar answered Nov 30 '25 08:11

Lubos



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!