App crashing after 5.16 upgrade


#1

I’m currently on MacOs 10.14 with Xcode 10.1 and RubyMotion 5.16. My app builds and deploys to the simulator but immediately crashes. It was functional prior to upgrading to Mojave. The last out put to the log before the crash is:

Objective-C stub for message evaluateJavaScript:completionHandler:' typev@:@@?’ not precompiled. Make sure you properly link with the framework or library that defines this message.

I can share the crash log if that’s helpful to anyone.


#2

There’s definitely been some BridgeSupport challenges. First I have to ask if you did a rake clean:all before building with 5.16?

Also, the Slack group is much more active than this forum, so if that doesn’t help, please come share in Motioneers (motioneers.herokuapp.com)


#3

Amir helped me figure this out. Solution was to run:

brew install ag
cd /Library/RubyMotion/data/ios/
ag evaluateJavaScript:completionHandler:

Which yields all the .bridgesupport files for evaluateJavaScript:completionHandler: such as:

┌── [ /Library/RubyMotion/data/ios ]
±> ag evaluateJavaScript:completionHandler:
10.1/BridgeSupport/WebKit.bridgesupport
386:<method selector=‘evaluateJavaScript:completionHandler:’>

And take the basename for the files, in this case WebKit, and it to the app.frameworks array in the Rakefile:

Motion::Project::App.setup do |app|
[…]
app.frameworks << “WebKit”
[…]
end