Page 1 of 2

Evothings BLE plugin not compiling on xcode 6.1

Posted: 09:10, 25 Feb 2015
by arickatz
I tried to compile a project that did compile before adding the plugin and I am getting 5 Apple mach-o linker error.
any ideas why?

Re: Evothings BLE plugin not compiling on xcode 6.1

Posted: 22:34, 25 Feb 2015
by Fredrik
We need to see the exact error message to tell what might have caused it. Please post the build log.

Re: Evothings BLE plugin not compiling on xcode 6.1

Posted: 20:00, 26 Feb 2015
by arickatz
Thanks, please see attached log:
Build target PhoneGapTemplate

Ld /Users/arickatz/Library/Developer/Xcode/DerivedData/BluetoothTest-cixorkwpnxfdfkhhzdiwcmedavll/Build/Products/Debug-iphonesimulator/BluetoothTest.app/BluetoothTest normal x86_64
cd /Users/arickatz/Desktop/BluetoothTest
export IPHONEOS_DEPLOYMENT_TARGET=7.0
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.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 x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.1.sdk -L/Users/arickatz/Library/Developer/Xcode/DerivedData/BluetoothTest-cixorkwpnxfdfkhhzdiwcmedavll/Build/Products/Debug-iphonesimulator -L/Users/arickatz/Desktop/BluetoothTest/BluetoothTest/Plugins/com.adobe.plugins.GAPlugin -F/Users/arickatz/Library/Developer/Xcode/DerivedData/BluetoothTest-cixorkwpnxfdfkhhzdiwcmedavll/Build/Products/Debug-iphonesimulator -filelist /Users/arickatz/Library/Developer/Xcode/DerivedData/BluetoothTest-cixorkwpnxfdfkhhzdiwcmedavll/Build/Intermediates/BluetoothTest.build/Debug-iphonesimulator/PhoneGapTemplate.build/Objects-normal/x86_64/BluetoothTest.LinkFileList -Xlinker -objc_abi_version -Xlinker 2 -weak_framework CoreFoundation -weak_framework UIKit -weak_framework AVFoundation -weak_framework CoreMedia -weak-lSystem -force_load /Users/arickatz/Library/Developer/Xcode/DerivedData/BluetoothTest-cixorkwpnxfdfkhhzdiwcmedavll/Build/Products/Debug-iphonesimulator/libCordova.a -ObjC -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=7.0 /Users/arickatz/Library/Developer/Xcode/DerivedData/BluetoothTest-cixorkwpnxfdfkhhzdiwcmedavll/Build/Products/Debug-iphonesimulator/libCordova.a -lz -liconv -framework AssetsLibrary -framework AddressBook -framework AddressBookUI -framework AudioToolbox -weak_framework AVFoundation -framework Foundation -weak_framework UIKit -framework CoreData -framework CoreLocation -framework CoreMotion -framework CoreVideo -weak_framework CoreMedia -framework CoreGraphics -framework QuartzCore -framework MobileCoreServices -framework MediaPlayer -framework SystemConfiguration -lGoogleAnalyticsServices -framework OpenAL -framework ImageIO -Xlinker -dependency_info -Xlinker /Users/arickatz/Library/Developer/Xcode/DerivedData/BluetoothTest-cixorkwpnxfdfkhhzdiwcmedavll/Build/Intermediates/BluetoothTest.build/Debug-iphonesimulator/PhoneGapTemplate.build/Objects-normal/x86_64/BluetoothTest_dependency_info.dat -o /Users/arickatz/Library/Developer/Xcode/DerivedData/BluetoothTest-cixorkwpnxfdfkhhzdiwcmedavll/Build/Products/Debug-iphonesimulator/BluetoothTest.app/BluetoothTest

Undefined symbols for architecture x86_64:
"_CBCentralManagerScanOptionAllowDuplicatesKey", referenced from:
-[EVOBLE scanForPeripherals] in EVOBLE.o
"_OBJC_CLASS_$_CBCentralManager", referenced from:
objc-class-ref in EVOBLE.o
"_OBJC_CLASS_$_CBPeripheral", referenced from:
l_OBJC_$_CATEGORY_CBPeripheral_$_BLEPluginSupport in EVOBLE.o
"_OBJC_CLASS_$_CBUUID", referenced from:
objc-class-ref in EVOBLE.o
l_OBJC_$_CATEGORY_CBUUID_$_StringExtraction in EVOBLE.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Re: Evothings BLE plugin not compiling on xcode 6.1

Posted: 13:02, 28 Feb 2015
by arickatz
I also tried to complie with the second plugin (evo.m and evoble.m) I get the similar error:
Ld /Users/arickatz/Library/Developer/Xcode/DerivedData/BluetoothTest-cixorkwpnxfdfkhhzdiwcmedavll/Build/Products/Debug-iphonesimulator/BluetoothTest.app/BluetoothTest normal x86_64
cd /Users/arickatz/Desktop/BluetoothTest
export IPHONEOS_DEPLOYMENT_TARGET=6.0
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.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 x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.1.sdk -L/Users/arickatz/Library/Developer/Xcode/DerivedData/BluetoothTest-cixorkwpnxfdfkhhzdiwcmedavll/Build/Products/Debug-iphonesimulator -L/Users/arickatz/Desktop/BluetoothTest/BluetoothTest/Plugins/com.adobe.plugins.GAPlugin -F/Users/arickatz/Library/Developer/Xcode/DerivedData/BluetoothTest-cixorkwpnxfdfkhhzdiwcmedavll/Build/Products/Debug-iphonesimulator -filelist /Users/arickatz/Library/Developer/Xcode/DerivedData/BluetoothTest-cixorkwpnxfdfkhhzdiwcmedavll/Build/Intermediates/BluetoothTest.build/Debug-iphonesimulator/PhoneGapTemplate.build/Objects-normal/x86_64/BluetoothTest.LinkFileList -Xlinker -objc_abi_version -Xlinker 2 -weak_framework CoreFoundation -weak_framework UIKit -weak_framework AVFoundation -weak_framework CoreMedia -weak-lSystem -force_load /Users/arickatz/Library/Developer/Xcode/DerivedData/BluetoothTest-cixorkwpnxfdfkhhzdiwcmedavll/Build/Products/Debug-iphonesimulator/libCordova.a -ObjC -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=6.0 /Users/arickatz/Library/Developer/Xcode/DerivedData/BluetoothTest-cixorkwpnxfdfkhhzdiwcmedavll/Build/Products/Debug-iphonesimulator/libCordova.a -lz -liconv -framework AssetsLibrary -framework AddressBook -framework AddressBookUI -framework AudioToolbox -weak_framework AVFoundation -framework Foundation -weak_framework UIKit -framework CoreData -framework CoreLocation -framework CoreMotion -framework CoreVideo -weak_framework CoreMedia -framework CoreGraphics -framework QuartzCore -framework MobileCoreServices -framework MediaPlayer -framework SystemConfiguration -lGoogleAnalyticsServices -framework OpenAL -framework ImageIO -Xlinker -dependency_info -Xlinker /Users/arickatz/Library/Developer/Xcode/DerivedData/BluetoothTest-cixorkwpnxfdfkhhzdiwcmedavll/Build/Intermediates/BluetoothTest.build/Debug-iphonesimulator/PhoneGapTemplate.build/Objects-normal/x86_64/BluetoothTest_dependency_info.dat -o /Users/arickatz/Library/Developer/Xcode/DerivedData/BluetoothTest-cixorkwpnxfdfkhhzdiwcmedavll/Build/Products/Debug-iphonesimulator/BluetoothTest.app/BluetoothTest

Undefined symbols for architecture x86_64:
"_CBCentralManagerScanOptionAllowDuplicatesKey", referenced from:
-[EVOBLE scanForPeripherals] in EVOBLE.o
"_OBJC_CLASS_$_CBCentralManager", referenced from:
objc-class-ref in EVOBLE.o
"_OBJC_CLASS_$_CBPeripheral", referenced from:
l_OBJC_$_CATEGORY_CBPeripheral_$_BLEPluginSupport in EVOBLE.o
"_OBJC_CLASS_$_CBUUID", referenced from:
objc-class-ref in EVOBLE.o
l_OBJC_$_CATEGORY_CBUUID_$_StringExtraction in EVOBLE.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Re: Evothings BLE plugin not compiling on xcode 6.1

Posted: 11:24, 02 Mar 2015
by Fredrik
Thank you for the logs. You are attempting to build for the "iphonesimulator" architecture, which does not have BLE support. Build for an actual iOS device instead.

Re: Evothings BLE plugin not compiling on xcode 6.1

Posted: 12:46, 02 Mar 2015
by arickatz
I will test and let you know, thanks.

Re: Evothings BLE plugin not compiling on xcode 6.1

Posted: 05:50, 03 Mar 2015
by arickatz
I saw that in my project I have 2 schemas: phonegap template and CordovaLib.
When I changed both to ios device and built, I get success for the CordovaLib schema but the same errors for
the phonegap template schema, any ideas why? can I run only with the cordovaLib schema?

Re: Evothings BLE plugin not compiling on xcode 6.1

Posted: 19:48, 03 Mar 2015
by arickatz
Apparently the relevant schema is the phonegap template.
I tried running the solution directly on the iphone from xcode (so this is definitely not a simulator), yet I am still getting the
same errors (Apple mach-o linker error). I deleted most of the .m file code and then it complied correctly and was ready to run.
I am nor sure if it has something to do with a missing ref and what is the difference from earlier versions of xcode,
but I know that only the local notifications plugins runs correctly on this project and when adding this plug I am getting the mentioned errors.
Any help would be much appreciated.

Re: Evothings BLE plugin not compiling on xcode 6.1

Posted: 10:28, 04 Mar 2015
by Fredrik
Sorry, I don't know anything about xcode schemas. I've asked my colleagues to help.

Re: Evothings BLE plugin not compiling on xcode 6.1

Posted: 11:45, 04 Mar 2015
by micke
@arickatz Hi, do you have the framework CoreBluetooth.framework added? Looks like this might be missing.
Regards, Mikael