Realm framework gets stripped when distributing app packages
See original GitHub issueI’m getting the following crash when opening the app after installing it on device via Fabric Beta:
Thread : Fatal Exception: RCTFatalException: Unhandled JS Exception: Missing Realm constructor - please ensure RealmReact framework is included!
0 CoreFoundation 0x18275d900 __exceptionPreprocess
1 libobjc.A.dylib 0x181dcbf80 objc_exception_throw
2 CoreFoundation 0x18275d848 -[NSException initWithCoder:]
3 MyApp 0x10003e638 RCTFatal (RCTAssert.m:133)
4 MyApp 0x10005a96c -[RCTExceptionsManager reportFatalException:stack:exceptionId:] (RCTExceptionsManager.m:64)
5 CoreFoundation 0x182763430 __invoking___
6 CoreFoundation 0x182660eb4 -[NSInvocation invoke]
7 CoreFoundation 0x1826657e0 -[NSInvocation invokeWithTarget:]
8 MyApp 0x100073fdc -[RCTModuleMethod invokeWithBridge:module:arguments:] (RCTModuleMethod.m:472)
9 MyApp 0x1000474f8 -[RCTBatchedBridge _handleRequestNumber:moduleID:methodID:params:] (RCTBatchedBridge.m:921)
10 MyApp 0x100046ee8 __33-[RCTBatchedBridge handleBuffer:]_block_invoke387 (RCTBatchedBridge.m:851)
11 libdispatch.dylib 0x1821b1630 _dispatch_call_block_and_release
12 libdispatch.dylib 0x1821b15f0 _dispatch_client_callout
13 libdispatch.dylib 0x1821bd634 _dispatch_queue_drain
14 libdispatch.dylib 0x1821b50f4 _dispatch_queue_invoke
15 libdispatch.dylib 0x1821b15f0 _dispatch_client_callout
16 libdispatch.dylib 0x1821bfa88 _dispatch_root_queue_drain
17 libdispatch.dylib 0x1821bf224 _dispatch_worker_thread3
18 libsystem_pthread.dylib 0x1823c5470 _pthread_wqthread
19 libsystem_pthread.dylib 0x1823c5020 start_wqthread
Here’s some extra information about my setup:
- Tested using React Native 0.18.1 and 0.19.0
- Using CocoaPods for installing react native, fabric+crashlytics
- Running on simulator with Release in the schema works fine.
- Running on device directly from Xcode with Release in the schema works fine.
Issue Analytics
- State:
- Created 8 years ago
- Comments:15 (8 by maintainers)
Top Results From Across the Web
xcode14:Library not loaded: /usr/lib/swift ...
4.1 is running properly, but after upgrading Xcode14, the debugging device reports an error: Library not loaded: / usr/lib/swift/libswiftCoreGraphics dylib, I ...
Read more >Install Realm for iOS, macOS, tvOS, and watchOS
Select the Package Products. Select both Realm and RealmSwift , then click Add Package .
Read more >Creating and Distributing an iOS Binary Framework
Learn how to build an iOS binary framework with this tutorial. If you're distributing a framework that contains intellectual property, ...
Read more >What is the application size impact of using Realm DB in ...
Realm should only add around 5 to 8 MB to your app's download size. ... stripped by the App Store automatically when apps...
Read more >Tampering and Reverse Engineering on iOS
iOS reverse engineering is a mixed bag. On one hand, apps programmed in Objective-C and Swift can be disassembled nicely. In Objective-C, object...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Still happens
Hi,
Another scenario when this is happening on Android: The app is turned off and it receives a push notification.
import Realm
is called and this error appears: The same issue happened with CodePush but it was fixed by calling the constructor only when a specific method was called (ex.CodePush.sync()
).Thank You!