I'm working on an Unity project where I'm using the Google VR SDK for Unity and the FirebaseMessaging.unitypackage
from the Firebase SDK for Unity.
This combination of Google SDK's throws a duplicate symbols
error when I try to build for iOS.
Minimal, Complete, and Verifiable example to reproduce the error:
Requirements:
- iOS device (version 7.0 or later)
- Computer with macOS
- Latest Unity version (5.5.2f1)
- Latest Xcode version (8.2.1)
Steps:
- Download the Google VR SDK for Unity (v1.20).
- Download the Firebase SDK for Unity (v3.0.0).
- Unzip the Firebase SDK for Unity.
- Open Unity and create a new project.
- Go to File > Build Settings... , select iOS and click on Switch Platform.
- Open Player Settings... and set a Bundle Identifier.
- Go to Assets > Import Package > Custom package... , select the
GoogleVRForUnity.unitypackage
and import all except the Demos folder. - A Pop-Up window will appear. Select I Made a Backup, Go Ahead!.
- Another Pop-Up window will appear. Select Import Package and Import all.
- Go to Assets > Import Package > Custom package... , select the unzipped
FirebaseMessaging.unitypackage
and import all of it. - File > Save project
- Connect the iOS device to the computer.
- File > Build & Run
- The Xcode build will fail because the project needs a signing with a team. Set it in your Xcode project to a valid one.
- Press the Xcode play button to build & run the project on your connected iOS device.
The project build on Xcode will end with the following error:
25 duplicate symbols for architecture arm64
The architecture changes depending of the connected iOS device, but the error is the same.
- Is there something that we can do?
- Is it an error that must be resolved by Google?