-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
XCFramework is crashing with latest RealmSwift version on Real.configuration #8218
Comments
Hi @amirpervaizQI, can you try producing the XCFrameworks with our build script instead? Clone the realm-swift repo and then run |
Hi @leemaguire thank you for your reply. Sorry If I didnt explain my question clearly. I am building a custom XCFramework and that is using RealmSwift as a dependency. When I build my XCFramework and distribute it via cocoapods by using Realm dependency as s.dependency 'RealmSwift', '10.38.0' in my podspecs file. Then, it is throwing the above crash in an app. Whereas when I use my custom Framework via code with RealSwift in the app, I dont observer any crash. The issue is happening with the latest swift versions with the XCFramework. Though it seems to be working with an older version 10.19.0. Should I make Realm/RealmSwift XCFramework with the script and use it in my Framework? |
Hi @amirpervaizQI I was able to reproduce your issue and I was able to find a workaround |
Thanks @dianaafanador3 , I got these errors when I try to compile my framework with Realm.xcframework and RealmSwift.xcframework manually created by the above command you mentioned. Using Xcode 14.3 and used the XCFramework in swift-14.3 folder. |
@amirpervaizQI is this missing symbol only for the current architecture? |
-Xcode 14.3 |
@amirpervaizQI how are you importing the xcframework into your own framework?. |
Hi @dianaafanador3 thank you so much for sharing the sample app. I checked it and it worked in the sample app. However, in my case, I cant embed RealmSwift inside of the XCFramework. The above error occurs while integrating from pod. I tried the latest pod but still the same. I think its linked with BUILD_LIBRARY_FOR_DISTRIBUTION what you mentioned above. |
Hi @dianaafanador3 could you pls check what got changed from 10.21.0 onwards that broke the RealmSwift in an XCFramework? I found this ticket #7989 it explains the same issue. I would appreciate your help looking into it. I just tried the latest version 10.44.0 but still it breaks when used as a dependency in the XCFramework. thanks. |
Still looking for a fix. Please update. |
Check out this workaround #7989 (comment) |
Hi @dianaafanador3 I recently tested one of my old project - which was originally created using Xcode 11 - on Xcode 15.3. Surprisingly, I didnt encounter any crashes while running the XCFramework with RealmSwift as a dependency. I am wondering this could be RealmSwift compatibility issue or Xcode linkers? Any insights you might have on this matter would be greatly appreciated. Thank you. |
How frequently does the bug occur?
Always
Description
Hi,
I am making XCFrameworkk with the -ObjC linkers as mentioned in another thread. Realmswift v10.38.0 is a dependency in the podspecs file.
but it is crashing on init Realm at configuration. Please see the screenshot below:
I am using RealSwift 10.38.0 and have tried a few older versions but getting the same error. It used to work with 10.19.0.
It also working when I use the code instead of XCFramework. Could you please check this issue?
Thanks.
Stacktrace & log output
No response
Can you reproduce the bug?
Always
Reproduction Steps
No response
Version
10.38.0
What Atlas Services are you using?
Local Database only
Are you using encryption?
Yes
Platform OS and version(s)
iOS 16.3
Build environment
Xcode version: Version 14.2 (14C18)
Dependency manager and version: Cocoapods 1.12.1
The text was updated successfully, but these errors were encountered: