Reputation: 4302
I'm trying to use the Hue SDK for iOS (iOS deployment target: 9.3) in swift. I've downloaded the source from github and followed the instructions..
let sdk = PHHueSDK()
in AppDelegateThe have performed "clean build folder" When I run the App, I get the following error messages:
Undefined symbols for architecture x86_64: "_OBJC_CLASS_$_DDLog", referenced from:
objc-class-ref in HueSDK_iOS(PHBridgeVersionManager.o) objc-class-ref in HueSDK_iOS(PHAuthentication.o) objc-class-ref in HueSDK_iOS(PHHeartbeatProcessingLocal.o) objc-class-ref in HueSDK_iOS(PHCLIPWrapper.o) objc-class-ref in HueSDK_iOS(PHAuthenticationStorage.o) objc-class-ref in HueSDK_iOS(PHHueSDK.o) objc-class-ref in HueSDK_iOS(PHHttpRequester.o) ...
"_OBJC_CLASS_$_DDTTYLogger", referenced from:
objc-class-ref in HueSDK_iOS(PHHueSDK.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit
code 1 (use -v to see invocation)
It seems that i have a problem linking the SDK to the project.
What am I doing wrong?
My problem seems to be related to this stack overflow thread. I have also added the SystemConfiguration.framework suggested in that thread, but without success.
Upvotes: 0
Views: 511
Reputation: 1347
DDLog is a Lumberjack method, so the linker is not finding the compiled Lumberjack code.
@Rapsefar, I followed the steps exactly as you outlined above using 7.3.1, 9.3, and the current HueSDK_iOS.framework and Lumberjack folder to create an app named "HueSwiftiOS". It compiled and ran without problem. Here is the content of my bridging header file:
// HueSwiftiOS-Bridging-Header.h
#ifndef HueSwiftiOS_Bridging_Header_h
#define HueSwiftiOS_Bridging_Header_h
#import <HueSDK_iOS/HueSDK.h>
#endif
No linker errors and the call:
let sdk = PHHueSDK()
print("sdk initialized: \(sdk)")
reports:
sdk initialized: <PHHueSDK: 0x125645640>
Upvotes: 0