I recently built my project fine from Unity to Xcode and it ran perfectly well. Since then I have added the Unity ads to my project in Unity (and then realised I no longer need that as it comes inside of unity 5.3 with Services) so I removed the download. However when I built to Xcode I notice 2 Unity Ads in the frameworks that are linked when built. I get this error:
/Users/Clive/Library/Developer/Xcode/DerivedData/Unity-iPhone-dprwctphrztswsbrhuqrdbgezzuy/Build/Intermediates/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/Objects-normal/armv7/UnityAdsUnityWrapper-6D362980BD529555.o /Users/Clive/Library/Developer/Xcode/DerivedData/Unity-iPhone-dprwctphrztswsbrhuqrdbgezzuy/Build/Intermediates/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/Objects-normal/armv7/UnityAdsUnityWrapper-498FCC2E7A8DF058.o duplicate symbol _OBJC_CLASS_$_UnityAdsUnityWrapper in: /Users/Clive/Library/Developer/Xcode/DerivedData/Unity-iPhone-dprwctphrztswsbrhuqrdbgezzuy/Build/Intermediates/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/Objects-normal/armv7/UnityAdsUnityWrapper-6D362980BD529555.o /Users/Clive/Library/Developer/Xcode/DerivedData/Unity-iPhone-dprwctphrztswsbrhuqrdbgezzuy/Build/Intermediates/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/Objects-normal/armv7/UnityAdsUnityWrapper-498FCC2E7A8DF058.o duplicate symbol _OBJC_METACLASS_$_UnityAdsUnityWrapper in: /Users/Clive/Library/Developer/Xcode/DerivedData/Unity-iPhone-dprwctphrztswsbrhuqrdbgezzuy/Build/Intermediates/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/Objects-normal/armv7/UnityAdsUnityWrapper-6D362980BD529555.o /Users/Clive/Library/Developer/Xcode/DerivedData/Unity-iPhone-dprwctphrztswsbrhuqrdbgezzuy/Build/Intermediates/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/Objects-normal/armv7/UnityAdsUnityWrapper-498FCC2E7A8DF058.o duplicate symbol _UnityAdsCreateNSString in: /Users/Clive/Library/Developer/Xcode/DerivedData/Unity-iPhone-dprwctphrztswsbrhuqrdbgezzuy/Build/Intermediates/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/Objects-normal/armv7/UnityAdsUnityWrapper-6D362980BD529555.o /Users/Clive/Library/Developer/Xcode/DerivedData/Unity-iPhone-dprwctphrztswsbrhuqrdbgezzuy/Build/Intermediates/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/Objects-normal/armv7/UnityAdsUnityWrapper-498FCC2E7A8DF058.o duplicate symbol _OBJC_IVAR_$_UnityAdsUnityWrapper._gameId in: /Users/Clive/Library/Developer/Xcode/DerivedData/Unity-iPhone-dprwctphrztswsbrhuqrdbgezzuy/Build/Intermediates/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/Objects-normal/armv7/UnityAdsUnityWrapper-6D362980BD529555.o /Users/Clive/Library/Developer/Xcode/DerivedData/Unity-iPhone-dprwctphrztswsbrhuqrdbgezzuy/Build/Intermediates/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/Objects-normal/armv7/UnityAdsUnityWrapper-498FCC2E7A8DF058.o ld: 5 duplicate symbols for architecture armv7 clang: error: linker command failed with exit code 1 (use -v to see invocation)
I tried to remove one of the linked library Unity Ads but still get the same error, any ideas?
I found a workaround.
Open the Xcode project select the UnityAdsUnityWrapper.mm in the UnityAds folder Then uncheck the Target membership Unity-Iphone
Seems to work now.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With