0

While taking builds it failed.Error saying "/clang:-1: linker command failed with exit code 1 (use -v to see invocation)" .I added a plugin to my project in unity.Is it something to do with the plugin.I considered this Link for solution.Here I cant find anything called Pods.Using Unity2018.2.1f1 and Xcode 10 beta.I will attach an image below of my project view in xcode. enter image description here Issue Navigator

Ld /Users/ar/Library/Developer/Xcode/DerivedData/Unity-iPhone-bwrscueopskznmbrdgdlaztrxbdz/Build/Products/ReleaseForRunning-iphoneos/BLEDevice.app/BLEDevice normal arm64 (in target: Unity-iPhone)
cd /Users/ar/Desktop/Mobile\ builds/BLEplugin
export IPHONEOS_DEPLOYMENT_TARGET=11.3
/Users/ar/Documents/Xcode10_beta/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch arm64 -isysroot /Users/ar/Documents/Xcode10_beta/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.0.sdk -L/Users/ar/Library/Developer/Xcode/DerivedData/Unity-iPhone-bwrscueopskznmbrdgdlaztrxbdz/Build/Products/ReleaseForRunning-iphoneos -L/Users/ar/Desktop/Mobile\ builds/BLEplugin -L/Users/ar/Desktop/Mobile\ builds/BLEplugin/Libraries -F/Users/ar/Library/Developer/Xcode/DerivedData/Unity-iPhone-bwrscueopskznmbrdgdlaztrxbdz/Build/Products/ReleaseForRunning-iphoneos -filelist /Users/ar/Library/Developer/Xcode/DerivedData/Unity-iPhone-bwrscueopskznmbrdgdlaztrxbdz/Build/Intermediates.noindex/Unity-iPhone.build/ReleaseForRunning-iphoneos/Unity-iPhone.build/Objects-normal/arm64/BLEDevice.LinkFileList -Xlinker -map -Xlinker /Users/ar/Library/Developer/Xcode/DerivedData/Unity-iPhone-bwrscueopskznmbrdgdlaztrxbdz/Build/Intermediates.noindex/Unity-iPhone.build/ReleaseForRunning-iphoneos/Unity-iPhone.build/BLEDevice-LinkMap-normal-arm64.txt -miphoneos-version-min=11.3 -dead_strip -Xlinker -object_path_lto -Xlinker /Users/ar/Library/Developer/Xcode/DerivedData/Unity-iPhone-bwrscueopskznmbrdgdlaztrxbdz/Build/Intermediates.noindex/Unity-iPhone.build/ReleaseForRunning-iphoneos/Unity-iPhone.build/Objects-normal/arm64/BLEDevice_lto.o -fembed-bitcode-marker -stdlib=libc++ -fobjc-arc -fobjc-link-runtime -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 -Xlinker -dependency_info -Xlinker /Users/ar/Library/Developer/Xcode/DerivedData/Unity-iPhone-bwrscueopskznmbrdgdlaztrxbdz/Build/Intermediates.noindex/Unity-iPhone.build/ReleaseForRunning-iphoneos/Unity-iPhone.build/Objects-normal/arm64/BLEDevice_dependency_info.dat -o /Users/ar/Library/Developer/Xcode/DerivedData/Unity-iPhone-bwrscueopskznmbrdgdlaztrxbdz/Build/Products/ReleaseForRunning-iphoneos/BLEDevice.app/BLEDevice

Undefined symbols for architecture arm64:
  "_OBJC_CLASS_$_CBMutableService", referenced from:
      objc-class-ref in UnityBluetoothLE.o
  "_OBJC_CLASS_$_CBMutableCharacteristic", referenced from:
      objc-class-ref in UnityBluetoothLE.o
  "_CBAdvertisementDataManufacturerDataKey", referenced from:
      -[UnityBluetoothLE centralManager:didDiscoverPeripheral:advertisementData:RSSI:] in UnityBluetoothLE.o
  "_CBAdvertisementDataServiceUUIDsKey", referenced from:
      -[UnityBluetoothLE startAdvertising] in UnityBluetoothLE.o
  "_OBJC_CLASS_$_CBUUID", referenced from:
      objc-class-ref in UnityBluetoothLE.o
  "_CBAdvertisementDataLocalNameKey", referenced from:
      -[UnityBluetoothLE startAdvertising] in UnityBluetoothLE.o
      -[UnityBluetoothLE centralManager:didDiscoverPeripheral:advertisementData:RSSI:] in UnityBluetoothLE.o
  "_OBJC_CLASS_$_CBPeripheralManager", referenced from:
      objc-class-ref in UnityBluetoothLE.o
  "_OBJC_CLASS_$_CBCentralManager", referenced from:
      objc-class-ref in UnityBluetoothLE.o
  "_CBCentralManagerScanOptionAllowDuplicatesKey", referenced from:
      __iOSBluetoothLEScanForPeripheralsWithServices in UnityBluetoothLE.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
zyonneo
  • 1,319
  • 5
  • 25
  • 63
  • If you could also post the exact error notification (go to the issue navigator and click on the error), that would be terrific. exit code 1 could be almost anything from a file modified during build to missing libraries – Geru Aug 01 '18 at 09:48
  • @Geru updated the pic – zyonneo Aug 01 '18 at 09:52
  • If you right click on the error and select "Reveal in Log" you will get additional information. – Tiberiu Maran Aug 01 '18 at 10:26
  • @artcorpse thank you..I dont know swift and IOS I use this only to take IOS builds from unity. updated the error from LOG...using a bluetooth plugin. – zyonneo Aug 01 '18 at 11:06

1 Answers1

1

I haven't ever used Unity, but your error specifically says that several symbols in your Unity Bluetooth LE Library are undefined for platform arm64. This means that it does not contain the right machine code for arm64, which is the platform used by iPhones. This means you need to replace the library with another one. I found several bluetooth le libraries in the Unity Asset Store. Good luck with using any of those.

Geru
  • 624
  • 1
  • 7
  • 20