-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using Realm from RubyMotion throws "framework not found for architecture i386" error #981
Comments
Hi guys, sorry to bump but has there been any progress on this? We'd really love to get started with Realm+RubyMotion :) Happy to help out and have a dig so let me know if I can be of any help. |
I've also encountered this bug while trying to use Realm with RubyMotion. Any help would be appreciated, thanks. |
I am personally swamped at the moment. I have asked a co-worker to look into it if he has time today, but I can’t make any promises. |
Thanks @alloy, really appreciate it, and again let me know if I can do some digging for you. |
Thanks @alloy. @nickdaniels if you're willing to help, you'll find more details about this issue in #964. The crux of the issue is that the RubyMotion linker can't find the |
Fixes realm#981. This will still link the objects in the static archive (the fake framework) into the application binary, but it will also setup the frameworks search path during the application linking phase so that `Realm.framework` can be found. This last part is important, because the `models` static library, which is built with clang modules enabled (the default), will contain a linker load flag that tells the linker to also load `Realm.framework` when linking the `models` static library and if at that time (the application linking phase) `Realm.framework` cannot be found in any frameworks search paths, an unhelpful error like the following will be raised: ld: framework not found Realm for architecture i386 The linker load flag (`LC_LINKER_OPTION`) that gets added to the `models` static library and that triggers the loading of `Realm.framework` is the following: otool -l models/build-iPhoneSimulator/libmodels.a … Load command 10 cmd LC_LINKER_OPTION cmdsize 32 count 2 string realm#1 -framework string realm#2 Realm …
Great stuff, thank you @alloy that works perfectly and saved me a lot of potential digging! Really appreciate your fantastic support with RubyMotion in general. |
@nickdaniels Thanks, great to hear! ❤️ |
Hi, |
solved previous problem |
More details in #964 /cc @alloy
The text was updated successfully, but these errors were encountered: