Previously, I am able to build and run my Unity output Xcode project with no problems. But now that Apple requires 64-bit support for iOS apps, I am forced to do the following changes in Unity:
Build settings -> Player settings -> Other settings -> Scripting backend -> IL2CPP
Build settings -> Player settings -> Other settings -> Architecture -> Universal
The problem now is that I cannot successfully build and run my Xcode project on my device. I am getting this Apple Mach-O linker error
which I wasn't getting before.
Here's the error that I got from Xcode:
ld: warning: directory not found for option '-F-F/Users/user/Desktop/qwer/Frameworks/Plugins/IOS'
ld: warning: directory not found for option '-F"/Users/user/Desktop/qwer/../../Documents/Unity Projects/Unity 5.0.0 projects/MyGame/Assets/Editor/Vungle/VungleSDK"'
duplicate symbol l082 in:
/Users/user/Documents/Unity Projects/Unity 5.0.0 projects/MyGame/Assets/Editor/Vungle/VungleSDK/VungleSDK.framework/VungleSDK(FMDatabase.o)
/Users/user/Documents/Unity Projects/Unity 5.0.0 projects/MyGame/Assets/Editor/Vungle/VungleSDK/VungleSDK.framework/VungleSDK(VungleAdViewController.o)
duplicate symbol l084 in:
/Users/user/Documents/Unity Projects/Unity 5.0.0 projects/MyGame/Assets/Editor/Vungle/VungleSDK/VungleSDK.framework/VungleSDK(VungleVideoPlayer.o)
/Users/user/Documents/Unity Projects/Unity 5.0.0 projects/MyGame/Assets/Editor/Vungle/VungleSDK/VungleSDK.framework/VungleSDK(VungleAdViewController.o)
ld: 2 duplicate symbols for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
From what I've observed, seems to be something with the VungleSDK
location? Which is strange to me because I made no changes other than the one I mentioned above.
Does anyone know how to fix this issue?
Also side note: Is anyone experiencing slow compile time when switching to IL2CPP
and Universal
Architecture? I have already switch my Xcode build to Release
(as someone suggested online) and it's still like that. It takes a very long while for my code to compile. It only took like less than 10seconds before I switched to IL2CPP and Universal
UPDATE: I need to mention that I'm using Chartboost
, AdColony
, and Vungle
in my app. I did some experimenting and found out that removing the -ObjC
and -fobjc-arc
linker flags from my Xcode project fixed the Mach-O linker error and I'm able to build and run successfully again. The warning: directory not found for option
I was getting was still there though, but it still did compile and run successfully and all functions of Chartboost
and Vungle
was fully working in my app.
I had those linker flags in the first place because the AdColony
SDK requires them. But removing them made AdColony to stop functioning in my app. So it's not a clean solution either.
This leads me to believe either 2 things: the AdColony
unity plugin may have problems with supporting Universal/ARM64 architecture OR the -ObjC
linker flag is not compatible for building to Universal/ARM64 architecture.
I'd appreciate if anyone can shed some light on this confusing issue.
Thanks
ignoring
comments on the error, I think it does support 64. – Macready