MobiVM / robovm

Ahead of time compiler for JVM bytecode targetting iOS, Mac OSX and Linux
https://mobivm.github.io
967 stars 133 forks source link

* fixed: crashing sideloaded app on m1 (fix for #659) #660

Closed dkimitsa closed 2 years ago

dkimitsa commented 2 years ago

problem: SideLoaded apps were silently dying.

Actually -- not. If started with stderror redirection open --stdout=0.log --stderr=1.log -W /Applications/test_app.app following exception was observed:

java.lang.UnsatisfiedLinkError: Library 'UIKit' not found at org.robovm.rt.bro.Runtime.getHandle(Runtime.java:317) at org.robovm.rt.bro.Runtime.loadLibrary(Runtime.java:191) at org.robovm.rt.bro.Bro.bind(Bro.java:60) at org.robovm.objc.ObjCRuntime.bind(ObjCRuntime.java:92) at org.robovm.apple.uikit.UIResponder.(UIResponder.java:53) at com.mycompany.myapp.Main.main(Main.java:89)

Root case

library search path for iOSSupport was missing

workaround possible

Manually add search path:

    public static void main(String[] args) {
        Runtime.addSearchPath("/System/iOSSupport/System/Library/Frameworks/");