xcode - linker command failed with exit code 1
Hello,
I keep getting this error every time I try to build my iOS game with Xcode(10) - Unity 2018, done some research but have yet to find a solution/reason for the issue. Anyone else has issue or any ideas?
ERROR: "linker command failed with exit code 1"
Thanks!
Answer by Alex_lemes · Sep 28, 2018 at 02:28 PM
after lots more digging i found the solution:
SOLUTION:
open xcworkspace and NOT xcodeproj
I'm having the same issue. I'm building to an iPad 3rd gen on iOS 9.3.5 from a $$anonymous$$acBook running $$anonymous$$ojave. I was not able to find any xcworkspace file either. Any help would be appreciated.
Where is xcworkspace, i cannot find it anywhere. Or is this infomation out of date now?
The file is in the same folder as the .xcproject file
Answer by $$anonymous$$ · Oct 27, 2018 at 05:44 AM
This could be happen if you try to run your project in simulator instead of real device. @garv3
Best answer. In my case I found that after I inserted 3d party package I got the same problem. And was need to remove Subset from api compatibility level.
Answer by garv3 · Oct 10, 2018 at 11:18 AM
There is no xcworkspace in my project folder.
are u sure? it's not exactly called xcworkspace, can't remember off the top of my head but it's like .workspace or something.
$$anonymous$$aybe share a screenshot if it's still an issue.
Hi guys. Still on this issue. $$anonymous$$y project doesn't generate a workspace file. I tried to attach a print screen here but it didn't work. But, believe me. I know what kind of files you mentioned and it is not here. I must add that everything runs perfectly on my devices when I compile the project on Xcode. The problem is specifically with the archiving process. I really hope you can help me. $$anonymous$$ore than 24 hours with this problem. Thanks
hay, i don't have much knowledge, only that i had the xcworkspace file and i was able to open that ins$$anonymous$$d which fixed the issue. sorry
Answer by AsifNaeem · Nov 12, 2018 at 03:04 PM
I am also facing same problem. But it was working fine in older version of xcode. That happen after update to Mojave and xcode 10. My error is . .
Ld /Users/asif/Library/Developer/Xcode/DerivedData/Unity-iPhone-dtfnopazpadviecjlumcyzeknxtd/Build/Intermediates.noindex/Unity-iPhone.build/ReleaseForRunning-iphoneos/Unity-iPhone.build/Objects-normal/armv7/ProductName normal armv7 (in target: Unity-iPhone) cd /Users/asif/Documents/New\ Unity\ Project/IOS\ Build export IPHONEOS_DEPLOYMENT_TARGET=8.0 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk -L/Users/asif/Library/Developer/Xcode/DerivedData/Unity-iPhone-dtfnopazpadviecjlumcyzeknxtd/Build/Products/ReleaseForRunning-iphoneos -L/Users/asif/Documents/New\ Unity\ Project/IOS\ Build -L/Users/asif/Documents/New\ Unity\ Project/IOS\ Build/Libraries -F/Users/asif/Library/Developer/Xcode/DerivedData/Unity-iPhone-dtfnopazpadviecjlumcyzeknxtd/Build/Products/ReleaseForRunning-iphoneos -F/Users/asif/Documents/New\ Unity\ Project/IOS\ Build/Pods/Google-Mobile-Ads-SDK/Frameworks/frameworks -F/Users/asif/Documents/New\ Unity\ Project/IOS\ Build/Frameworks/Plugins/iOS -F/Users/asif/Documents/New\ Unity\ Project/IOS\ Build/UnityAds -filelist /Users/asif/Library/Developer/Xcode/DerivedData/Unity-iPhone-dtfnopazpadviecjlumcyzeknxtd/Build/Intermediates.noindex/Unity-iPhone.build/ReleaseForRunning-iphoneos/Unity-iPhone.build/Objects-normal/armv7/ProductName.LinkFileList -Xlinker -map -Xlinker /Users/asif/Library/Developer/Xcode/DerivedData/Unity-iPhone-dtfnopazpadviecjlumcyzeknxtd/Build/Intermediates.noindex/Unity-iPhone.build/ReleaseForRunning-iphoneos/Unity-iPhone.build/ProductName-LinkMap-normal-armv7.txt -miphoneos-version-min=8.0 -dead_strip -Xlinker -object_path_lto -Xlinker /Users/asif/Library/Developer/Xcode/DerivedData/Unity-iPhone-dtfnopazpadviecjlumcyzeknxtd/Build/Intermediates.noindex/Unity-iPhone.build/ReleaseForRunning-iphoneos/Unity-iPhone.build/Objects-normal/armv7/ProductName_lto.o -fembed-bitcode-marker -stdlib=libc++ -fobjc-arc -fobjc-link-runtime -ObjC -framework AVFoundation -framework AudioToolbox -framework CFNetwork -framework CoreGraphics -framework CoreMedia -framework CoreMotion -framework CoreTelephony -framework CoreVideo -framework GLKit -framework GoogleMobileAds -framework MediaPlayer -framework MessageUI -framework MobileCoreServices -framework OpenGLES -framework QuartzCore -framework Security -framework StoreKit -framework SystemConfiguration -weak_framework AdSupport -weak_framework JavaScriptCore -weak_framework SafariServices -weak_framework WebKit -weak_framework CoreMotion -weak-lSystem -framework Security -framework MediaToolbox -liPhone-lib -framework CoreText -framework AudioToolbox -weak_framework AVFoundation -framework CFNetwork -framework CoreGraphics -framework CoreLocation -framework CoreMedia -weak_framework CoreMotion -framework CoreVideo -framework Foundation -framework MediaPlayer -framework OpenAL -framework OpenGLES -framework QuartzCore -framework SystemConfiguration -framework UIKit -liconv.2 -lil2cpp -weak_framework Metal -framework UnityAds -framework UnityAds -weak_framework AdSupport -framework StoreKit -framework CoreTelephony -lPods-Unity-iPhone -Xlinker -dependency_info -Xlinker /Users/asif/Library/Developer/Xcode/DerivedData/Unity-iPhone-dtfnopazpadviecjlumcyzeknxtd/Build/Intermediates.noindex/Unity-iPhone.build/ReleaseForRunning-iphoneos/Unity-iPhone.build/Objects-normal/armv7/ProductName_dependency_info.dat -o /Users/asif/Library/Developer/Xcode/DerivedData/Unity-iPhone-dtfnopazpadviecjlumcyzeknxtd/Build/Intermediates.noindex/Unity-iPhone.build/ReleaseForRunning-iphoneos/Unity-iPhone.build/Objects-normal/armv7/ProductName
duplicate symbol OBJC_CLASS$_UnityAdsUnityWrapperDelegate in: /Users/asif/Library/Developer/Xcode/DerivedData/Unity-iPhone-dtfnopazpadviecjlumcyzeknxtd/Build/Intermediates.noindex/Unity-iPhone.build/ReleaseForRunning-iphoneos/Unity-iPhone.build/Objects-normal/armv7/UnityAdsUnityWrapper-b61a3e365e3d94efdf57ab854502e286f0004ed65ee5ff27c27446ef2b86d435.o /Users/asif/Library/Developer/Xcode/DerivedData/Unity-iPhone-dtfnopazpadviecjlumcyzeknxtd/Build/Intermediates.noindex/Unity-iPhone.build/ReleaseForRunning-iphoneos/Unity-iPhone.build/Objects-normal/armv7/UnityAdsUnityWrapper-b61a3e365e3d94efdf57ab854502e28603e0b523287a6dc34eab9f1a569a255a.o duplicate symbol OBJC_METACLASS$_UnityAdsUnityWrapperDelegate in: /Users/asif/Library/Developer/Xcode/DerivedData/Unity-iPhone-dtfnopazpadviecjlumcyzeknxtd/Build/Intermediates.noindex/Unity-iPhone.build/ReleaseForRunning-iphoneos/Unity-iPhone.build/Objects-normal/armv7/UnityAdsUnityWrapper-b61a3e365e3d94efdf57ab854502e286f0004ed65ee5ff27c27446ef2b86d435.o /Users/asif/Library/Developer/Xcode/DerivedData/Unity-iPhone-dtfnopazpadviecjlumcyzeknxtd/Build/Intermediates.noindex/Unity-iPhone.build/ReleaseForRunning-iphoneos/Unity-iPhone.build/Objects-normal/armv7/UnityAdsUnityWrapper-b61a3e365e3d94efdf57ab854502e28603e0b523287a6dc34eab9f1a569a255a.o ld: 2 duplicate symbols for architecture armv7 clang: error: linker command failed with exit code 1 (use -v to see invocation)
Answer by tonOnWu · Nov 17, 2018 at 01:53 AM
Hi guys.
I've been researching almost the whole day. Did you find any other solution?
I'm using Unity 2018.2.15.f1. Our App is an ARFoundation project. My Xcode is 10.1 (10B61). Everything works, but when we used Xcode to post our work to Apple Connect we get this error:
linker command failed with exit code 1 (use -v to see invocation) clang
I really appreciate any suggestion.