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

梦想与她 提交于 2019-12-23 18:35:57

问题


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


回答1:


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



来源:https://stackoverflow.com/questions/21008617/java-error-when-submitting-app-to-mac-store-deprecated-api-usage

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!