Skip to content
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

Undefined symbols error on build iOS Unity project #2318

Closed
1 of 2 tasks
stdev33 opened this issue Apr 3, 2021 · 2 comments · Fixed by #2340
Closed
1 of 2 tasks

Undefined symbols error on build iOS Unity project #2318

stdev33 opened this issue Apr 3, 2021 · 2 comments · Fixed by #2340
Assignees

Comments

@stdev33
Copy link

stdev33 commented Apr 3, 2021

Goals

Build Unity application for iOS target platform using Realm

Expected Results

Finish build process with no linker errors.

Actual Results

Linker error
Undefined symbols for architecture arm64: "_realm_thread_safe_reference_destroy", referenced from: _ThreadSafeReferenceHandle_Unbind_m8B516E342FFE32FA967A0774363A935962952FCD in Realm1.o _NativeMethods_destroy_realm_reference_m5953D89668770CFD7399888C4CF3FBCC136A591B in Realm1.o ld: symbol(s) not found for architecture arm64

Steps to Reproduce

  1. Create an empty Unity project, switch Build target to iOS;
  2. Import realm.unity.bundle-10.1.2.tgz using Package Manager;
  3. Create sample .cs script that invokes Realm.GetInstance() and uses sample RealmObject. Attach script to any object in the SampleScene.unity;
  4. Export Xcode project (File --> Build Settings... --> Build);
  5. Open Xcode project, setup your Team, Bundle Identifier and Provisioning Profile etc. in Signing & Capabilities tab;
  6. Set Enable Bitcode property to NO for both Unity-iPhone and UnityFramework targets (Build Settings tab --> Build Options);
  7. Try to build Xcode project (Command+B or top menu Product --> Build);
  8. Linker error will be thrown Undefined symbols for architecture arm64: "_realm_thread_safe_reference_destroy", referenced from: _ThreadSafeReferenceHandle_Unbind_m8B516E342FFE32FA967A0774363A935962952FCD in Realm1.o _NativeMethods_destroy_realm_reference_m5953D89668770CFD7399888C4CF3FBCC136A591B in Realm1.o ld: symbol(s) not found for architecture arm64

Code Sample

Version of Realm and Tooling

  • Realm Object Server Version: ? (you can see this as well in Studio once connected to a Realm instance)
  • Flavor:
    • Realm Cloud
    • Self-Hosted
  • Server OS & Version: ? (e.g. CentOS 6)
  • Client SDK Version: realm.unity.bundle-10.1.2
  • Client OS & Version: macOS Catalina 10.15.7
  • Unity 2020.3.2f1 (also reproduced with Unity 2019.4.20f1)
  • Xcode 12.4
@nirinchev
Copy link
Member

Hey, thanks for trying out the super early preview of the Unity version and providing detailed repro steps! The team is out for the Easter holidays, but we'll try to take a look next week.

@nirinchev
Copy link
Member

Hey, sorry for the delay here - I can see the issue and will have a fix shortly.

@nirinchev nirinchev mentioned this issue Apr 21, 2021
12 tasks
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants