-
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
SPM: Realm not found if APPLICATION_EXTENSION_API_ONLY is true on dynamic framework #8291
Comments
Hi @GianniCarlo any reason to set this |
Hi @dianaafanador3 ! thanks for the response, it's good to know that it's safe to use Realm for the extensions. I think I was looking into migrating https://github.com/TortugaPower/BookPlayer from CoreData to Realm, and at first when defining the model, it was building alright, it failed to build when I started writing the fetch queries and the results classes got involved. That's when I created a blank project and compared what was different between the dynamic frameworks and found the flag. Let me know if I can help with anything else 👌 |
The thing that's failing is the module verifier, which is an optional step that AFAICT is still completely broken if your dependency tree has any c++ in it (as ours does). Disabling it ("Enable Module Verifier" for SharedLibraryKit) makes the build succeed. |
@tgoyne nice! main project now compiles 😁, and as it's an internal shared library, this totally works for me. I haven't tested the new Xcode beta, but with all the new interoperability things between Swift and C++, hopefully they fixed their module verifier Thanks again for your help @dianaafanador3 @tgoyne |
help me to build success |
How frequently does the bug occur?
Always
Description
APPLICATION_EXTENSION_API_ONLY
set toYES
, it fails to build after adding a file to it that imports RealmSwift and tries to use it.(fatal) module 'Realm' not found
, in the sample repo I created, I added a screenshot in the READMEStacktrace & log output
No response
Can you reproduce the bug?
Always
Reproduction Steps
Link to sample project: https://github.com/GianniCarlo/SampleRealmApp/tree/main
APPLICATION_EXTENSION_API_ONLY
toYES
on its build settingsThis is the sample file I added to the framework
Version
10.41.0
What Atlas Services are you using?
Local Database only
Are you using encryption?
No
Platform OS and version(s)
Simulator iOS 16.4
Build environment
Xcode version: 14.3.1
Dependency manager and version: SPM
The text was updated successfully, but these errors were encountered: