-
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
Error loading RealmSwift dynamic framework in macOS app #8575
Comments
➤ PM Bot commented: Jira ticket: RCOCOA-2350 |
I have the same issue. Though my dependency graph might be more complex the problem is the same. I also tried to use |
This answer was helpful https://stackoverflow.com/a/73844861/4124265 I had to manually sign all frameworks in the |
I had to add post-build action as a workaround fix with this script:
|
Downgrade to 10.49.0 resolved issue. MacOS: 14.3 (23D56) So this is not XCode related issue. This is issue of RealmSwift library. Another possible workaround is to connect realmSwift as git submodule. I didn't tried it, but I believe that this will work even for latest release. |
Well, they switched to library |
from Realm team @nirinchev
|
Can you please share more details on how you did this? Did you clean the Derived Data folder, rebuild the project, and then change "Embed & Sign" for it to work? |
Is the option to statically link the library gone? Many "solutions" have the instruction to "embed and sign" RealmSwift but it's not what I want. |
@zhanswift Thank you for sharing the detailed steps.I don't think I have completed step 2 before. Let me give it a try and see if I can solve this. @Jeanno I think we can still do it; we just cannot use Swift Package Manager. |
Quick update. I tried the steps @zhanswift shared above on both the simulator and the physical device, and they seem to work fine. Thanks again for sharing; I really appreciate it. |
💡 UPDATE: 2024-06-10 Try the workaround provided by @zhanswift below #8575 (comment)
How frequently does the bug occur?
Always
Description
I'm encountering an issue loading the RealmSwift framework in my macOS app, and I'm hoping someone can provide some guidance.
I'm using Xcode 15.3 and have the RealmSwift 10.50.0 framework installed as a dependency in my project. The error suggests that the framework is not being correctly referenced or found during runtime. Build can be done successfully, though.
The error complains that the file '/Users//Library/Developer/Xcode/DerivedData/Foo-/Build/Products/Debug/RealmSwift.framework/Versions/A/RealmSwift' does not exist. It also states that the code signature for 'RealmSwift.framework/Versions/A/RealmSwift' (with the identifier <68E4E55B-1392-3E7B-B51C-B2FE88455CD8>) is not valid for use in the process, as the mapping process and the mapped file have different Team IDs.
I have ensured that I only included RealmSwift and made it an embedded and signed option.
Has anyone else encountered this issue before? If so, what steps did you take to resolve it? Any guidance would be greatly appreciated.
I have attached the sample project
Foo.zip
. You can download it from this link: [Foo.zip(https://github.com/realm/realm-swift/files/15208298/Foo.zip). I can confirm that downgrading the library to version 10.49.2 solved the issue.Stacktrace & log output
The issue at #8571 appears to be a similar problem.
Can you reproduce the bug?
Always
Reproduction Steps
Version
10.50.0
What Atlas Services are you using?
Local Database only
Are you using encryption?
No
Platform OS and version(s)
14.4
Build environment
Xcode version: 15.3
Dependency manager and version: ...
The text was updated successfully, but these errors were encountered: