Evothings BLE plugin not compiling on xcode 6.1

Ask, and ye shall receive.
arickatz
Posts: 22
Joined: 09:51, 11 Jan 2015

Evothings BLE plugin not compiling on xcode 6.1

Postby arickatz » 09:10, 25 Feb 2015

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?

Fredrik
Site Admin
Posts: 196
Joined: 15:00, 18 Nov 2013

Re: Evothings BLE plugin not compiling on xcode 6.1

Postby Fredrik » 22:34, 25 Feb 2015

We need to see the exact error message to tell what might have caused it. Please post the build log.

arickatz
Posts: 22
Joined: 09:51, 11 Jan 2015

Re: Evothings BLE plugin not compiling on xcode 6.1

Postby arickatz » 20:00, 26 Feb 2015

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)

arickatz
Posts: 22
Joined: 09:51, 11 Jan 2015

Re: Evothings BLE plugin not compiling on xcode 6.1

Postby arickatz » 13:02, 28 Feb 2015

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)

Fredrik
Site Admin
Posts: 196
Joined: 15:00, 18 Nov 2013

Re: Evothings BLE plugin not compiling on xcode 6.1

Postby Fredrik » 11:24, 02 Mar 2015

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.

arickatz
Posts: 22
Joined: 09:51, 11 Jan 2015

Re: Evothings BLE plugin not compiling on xcode 6.1

Postby arickatz » 12:46, 02 Mar 2015

I will test and let you know, thanks.

arickatz
Posts: 22
Joined: 09:51, 11 Jan 2015

Re: Evothings BLE plugin not compiling on xcode 6.1

Postby arickatz » 05:50, 03 Mar 2015

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?

arickatz
Posts: 22
Joined: 09:51, 11 Jan 2015

Re: Evothings BLE plugin not compiling on xcode 6.1

Postby arickatz » 19:48, 03 Mar 2015

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.

Fredrik
Site Admin
Posts: 196
Joined: 15:00, 18 Nov 2013

Re: Evothings BLE plugin not compiling on xcode 6.1

Postby Fredrik » 10:28, 04 Mar 2015

Sorry, I don't know anything about xcode schemas. I've asked my colleagues to help.

User avatar
micke
Posts: 256
Joined: 20:49, 18 Nov 2013

Re: Evothings BLE plugin not compiling on xcode 6.1

Postby micke » 11:45, 04 Mar 2015

@arickatz Hi, do you have the framework CoreBluetooth.framework added? Looks like this might be missing.
Regards, Mikael


Return to “Questions and answers”

Who is online

Users browsing this forum: No registered users and 48 guests