I am trying to include the Estimote SDK 3.0 into my project, but i am getting the following linking error:
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_ESTBeaconRegionWrapper", referenced from:
objc-class-ref in EstimoteSDK(ESTSecureBeaconManager.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I have added the framework to the 'Build phase' and checked that the framework search directory setting contains the directory.
I downloaded the example App from Estimote, and it used the same framework (that is where I copied it from) and that build fine. I can't see any obvious differences.
How can I figure out what is wrong?
EDIT: I am using Xcode 6.2. I am building for an iPhone 6 (said architectures arm64, armv7, armv7s). After the question below I build for armv7s, and I get the same error (for armv7s). So there must be a problem linking the Framework.
EDIT 2: I removed the -ObjC 'Other linker flag', as adding that to the Estimote project generates the same error. However now I get a lot more errors:
Ld /Users/.../iDomsPortalDev normal arm64
cd "/Users/.../idoms-portal"
export IPHONEOS_DEPLOYMENT_TARGET=7.0
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.2.sdk -L/Users/.../Products/Debug-iphoneos -F/Users/.../Products/Debug-iphoneos -FiDoms/frameworks -F/Applications/Xcode.app/Contents/Developer/Library/Frameworks -filelist /Users/.../Debug-iphoneos/iDoms\ Dev.build/Objects-normal/arm64/iDomsPortalDev.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -dead_strip -lxml2 -lc++ -fobjc-arc -fobjc-link-runtime -miphoneos-version-min=7.0 -framework CrashReporter -framework EstimoteSDK -weak_framework Accelerate -weak_framework Social -weak_framework Twitter -framework MessageUI -framework MapKit -framework AVFoundation -framework SystemConfiguration -framework MediaPlayer -framework QuartzCore -framework UIKit -framework Foundation -framework CoreGraphics -framework CoreData -framework CoreLocation -Xlinker -dependency_info -Xlinker /Users/.../Debug-iphoneos/iDoms\ Dev.build/Objects-normal/arm64/iDomsPortalDev_dependency_info.dat -o /Users/.../iDomsPortalDev
Undefined symbols for architecture arm64:
"_CBAdvertisementDataServiceDataKey", referenced from:
+[ESTDeviceDataHelper parseAdvertisingData:] in EstimoteSDK(ESTDeviceDataHelper.o)
"_OBJC_CLASS_$_CBCentralManager", referenced from:
objc-class-ref in EstimoteSDK(ESTBeaconDevice.o)
"_kSecAttrService", referenced from:
-[ESTKeychain dataForKey:] in EstimoteSDK(ESTKeychain.o)
-[ESTKeychain setObject:forKey:] in EstimoteSDK(ESTKeychain.o)
+[ESTKeychain bundleSeedID] in EstimoteSDK(ESTKeychain.o)
"_kSecAttrAccessibleAfterFirstUnlock", referenced from:
-[ESTKeychain setObject:forKey:] in EstimoteSDK(ESTKeychain.o)
"_OBJC_CLASS_$_CBUUID", referenced from:
objc-class-ref in EstimoteSDK(ESTBeaconDevice.o)
objc-class-ref in EstimoteSDK(ESTBluetoothServiceAuth.o)
objc-class-ref in EstimoteSDK(ESTBluetoothServiceEstimote.o)
objc-class-ref in EstimoteSDK(ESTBluetoothServiceOta.o)
objc-class-ref in EstimoteSDK(ESTBluetoothServiceSoftware.o)
objc-class-ref in EstimoteSDK(ETBluetoothMath.o)
"_kSecAttrAccessibleWhenUnlocked", referenced from:
-[ESTKeychain setObject:forKey:] in EstimoteSDK(ESTKeychain.o)
"_kSecReturnAttributes", referenced from:
+[ESTKeychain bundleSeedID] in EstimoteSDK(ESTKeychain.o)
"_kSecAttrAccessible", referenced from:
-[ESTKeychain setObject:forKey:] in EstimoteSDK(ESTKeychain.o)
"_kSecAttrAccessibleAlways", referenced from:
-[ESTKeychain setObject:forKey:] in EstimoteSDK(ESTKeychain.o)
"_CBCentralManagerScanOptionAllowDuplicatesKey", referenced from:
-[ESTBeaconDevice startScanning] in EstimoteSDK(ESTBeaconDevice.o)
"_SecItemDelete", referenced from:
-[ESTKeychain setObject:forKey:] in EstimoteSDK(ESTKeychain.o)
"_kSecAttrAccessibleAfterFirstUnlockThisDeviceOnly", referenced from:
-[ESTKeychain setObject:forKey:] in EstimoteSDK(ESTKeychain.o)
"_kSecAttrAccessibleAlwaysThisDeviceOnly", referenced from:
-[ESTKeychain setObject:forKey:] in EstimoteSDK(ESTKeychain.o)
"_SecItemUpdate", referenced from:
-[ESTKeychain setObject:forKey:] in EstimoteSDK(ESTKeychain.o)
"_kSecAttrAccessibleWhenUnlockedThisDeviceOnly", referenced from:
-[ESTKeychain setObject:forKey:] in EstimoteSDK(ESTKeychain.o)
"_SecItemAdd", referenced from:
-[ESTKeychain setObject:forKey:] in EstimoteSDK(ESTKeychain.o)
+[ESTKeychain bundleSeedID] in EstimoteSDK(ESTKeychain.o)
"_SecItemCopyMatching", referenced from:
-[ESTKeychain dataForKey:] in EstimoteSDK(ESTKeychain.o)
+[ESTKeychain bundleSeedID] in EstimoteSDK(ESTKeychain.o)
"_kSecClass", referenced from:
-[ESTKeychain dataForKey:] in EstimoteSDK(ESTKeychain.o)
-[ESTKeychain setObject:forKey:] in EstimoteSDK(ESTKeychain.o)
+[ESTKeychain bundleSeedID] in EstimoteSDK(ESTKeychain.o)
"_kSecClassGenericPassword", referenced from:
-[ESTKeychain dataForKey:] in EstimoteSDK(ESTKeychain.o)
-[ESTKeychain setObject:forKey:] in EstimoteSDK(ESTKeychain.o)
+[ESTKeychain bundleSeedID] in EstimoteSDK(ESTKeychain.o)
"_kSecAttrAccount", referenced from:
-[ESTKeychain dataForKey:] in EstimoteSDK(ESTKeychain.o)
-[ESTKeychain setObject:forKey:] in EstimoteSDK(ESTKeychain.o)
+[ESTKeychain bundleSeedID] in EstimoteSDK(ESTKeychain.o)
"_kSecValueData", referenced from:
-[ESTKeychain setObject:forKey:] in EstimoteSDK(ESTKeychain.o)
"_kSecAttrAccessGroup", referenced from:
-[ESTKeychain dataForKey:] in EstimoteSDK(ESTKeychain.o)
-[ESTKeychain setObject:forKey:] in EstimoteSDK(ESTKeychain.o)
+[ESTKeychain bundleSeedID] in EstimoteSDK(ESTKeychain.o)
"_kSecMatchLimitOne", referenced from:
-[ESTKeychain dataForKey:] in EstimoteSDK(ESTKeychain.o)
"_kSecMatchLimit", referenced from:
-[ESTKeychain dataForKey:] in EstimoteSDK(ESTKeychain.o)
"_kSecReturnData", referenced from:
-[ESTKeychain dataForKey:] in EstimoteSDK(ESTKeychain.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
[Edit 3:] With the Security.framework added it seems to make another step:
Ld /Users/.../Products/Debug-iphoneos/iDomsPortalDev.app/iDomsPortalDev normal arm64
cd "/Users/.../idoms-portal"
export IPHONEOS_DEPLOYMENT_TARGET=7.0
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.2.sdk -L/Users/.../Products/Debug-iphoneos -F/Users/.../Library/Frameworks -filelist /Users/.../iDoms.build/Debug-iphoneos/iDoms\ Dev.build/Objects-normal/arm64/iDomsPortalDev.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -dead_strip -lxml2 -fobjc-arc -fobjc-link-runtime -miphoneos-version-min=7.0 -framework Security -framework CrashReporter -framework EstimoteSDK -weak_framework Accelerate -weak_framework Social -weak_framework Twitter -framework MessageUI -framework MapKit -framework AVFoundation -framework SystemConfiguration -framework MediaPlayer -framework QuartzCore -framework UIKit -framework Foundation -framework CoreGraphics -framework CoreData -framework CoreLocation -Xlinker -dependency_info -Xlinker /Users/Luuk/Library/Developer/Xcode/DerivedData/iDoms-gperwbbtttggqpcvozenraexrhrx/Build/Intermediates/iDoms.build/Debug-iphoneos/iDoms\ Dev.build/Objects-normal/arm64/iDomsPortalDev_dependency_info.dat -o /Users/Luuk/Library/Developer/Xcode/DerivedData/iDoms-gperwbbtttggqpcvozenraexrhrx/Build/Products/Debug-iphoneos/iDomsPortalDev.app/iDomsPortalDev
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_CBCentralManager", referenced from:
objc-class-ref in EstimoteSDK(ESTBeaconDevice.o)
"_OBJC_CLASS_$_CBUUID", referenced from:
objc-class-ref in EstimoteSDK(ESTBeaconDevice.o)
objc-class-ref in EstimoteSDK(ESTBluetoothServiceAuth.o)
objc-class-ref in EstimoteSDK(ESTBluetoothServiceEstimote.o)
objc-class-ref in EstimoteSDK(ESTBluetoothServiceOta.o)
objc-class-ref in EstimoteSDK(ESTBluetoothServiceSoftware.o)
objc-class-ref in EstimoteSDK(ETBluetoothMath.o)
"_CBAdvertisementDataServiceDataKey", referenced from:
+[ESTDeviceDataHelper parseAdvertisingData:] in EstimoteSDK(ESTDeviceDataHelper.o)
"_CBCentralManagerScanOptionAllowDuplicatesKey", referenced from:
-[ESTBeaconDevice startScanning] in EstimoteSDK(ESTBeaconDevice.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I just downloaded https://github.com/Estimote/iOS-SDK their SDK and successfully included it in a sample project.
Under 'Build Settings' in 'Build Active Architecture Only' set 'Debug' to YES
Also Try In 'General' tabs
Make sure that EstimoteSDK.framework is actually present at its original location, you may have accidentally deleted it.
This is fixed in Estimote SDK 3.0.2! (:
https://github.com/Estimote/iOS-SDK/blob/master/CHANGELOG.md#302-march-26-2015
Looking at the podspec it specifies
-lc++
flag to be added toOTHER_LDFLAGS
. If you don't have this flag set, maybe that could cause such problems.Thanks to the various hints above I went through the whole build file, and found the flag that was different. It is 'Enable Modules', and was set to 'No' in my build settings.