-
Notifications
You must be signed in to change notification settings - Fork 167
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
Unity 6 iOS | Unable to load dynamic library '/realm-wrappers' #3693
Comments
So for previous Unity versions we needed to add a hacky workaround for the lack of support for xcframeworks. Unity 6 seems to add .xcframework support, which is why I'm guessing this is now broken and not behaving as intended. Since the Realm SDKs are now community supported, my suggestion would be to try and fix the issue and submit a PR (I'd be happy to review and provide feedback). To make it easier to iterate, it's probably best to first update to Realm 20.1.0 as that is the community version that doesn't include Atlas Device Sync, so it's a bit simpler. Then, you'd want to unarchive the |
Thanks very much for the quick reply. |
What happened?
We have been having the following error in our iOS builds when building from a Unity project with Realm.NET 10.19 after updating from Unity 2021.3.42f1 to Unity 6. (see stack trace) It builds successfully in Xcode but has this error in the console when the game is run on an iOS device.
Realm runs perfectly on the Windows, Mac, and Linux builds from this project.
I first checked Xcode for problems with embedding and linking the realm-wrappers.framework, but it is included in the final archive:
Notably, this is different from the Frameworks folder we had in the archive before Unity 6:
The .meta files used to be present and the realm-wrappers file was automatically detected as UNIX executable. Now with Unity 6 it would have to be made executable with
chmod +x realm-wrappers
, but doing this before Xcode starts archiving results in the same error in the build above.The output directly from Unity (before Xcode touches it) looks similar. Before Unity 6:
And after:
Additionally, under Library > PackageCache > io.realm.unity, the meta files appear to be present and the realm-wrappers is not an executable:
Inside Unity itself (before any build export has taken place) we noticed that the iOS realm-wrappers file was the only one that didn't have its platform ticked, although this also appeared to be the case in Unity 2021.3.42f1:
The equivalent on Android, for example, looks like this:
We don't know if the difference in the Frameworks folder is the actual issue or if it's just a symptom of a problem elsewhere.
We have tried deleting the package cache, reinstalling Realm into the project, and clearing the Library folder between builds. We have also tried updating Realm to the latest version but that caused other issues.
Note: using IL2CPP and .NET Standard 2.1
Repro steps
Using Realm.NET 10.19, currently trying to build an empty Unity 6 project with a debug window, ran directly from Xcode on a tethered device. It's proving very difficult to test.
Version
10.19
What Atlas Services are you using?
Local Database only
What type of application is this?
Unity
Client OS and version
iOS all versions
Code snippets
No response
Stacktrace of the exception/crash you're getting
Relevant log output
The text was updated successfully, but these errors were encountered: