Application Tool Kit

Swift example

Hi, I've been trying to integrate the math framework into my code but I keep getting the error below. Are there any tutorials for integrating into swift code?

Undefined symbols for architecture x86_64:
_SCNetworkReachabilityCreateWithAddress, referenced from:
+[STCReachability reachabilityWithAddress:] in libStylusCore.a(STCReachability.o)
_SCNetworkReachabilityCreateWithName, referenced from:
+[STCReachability reachabilityWithHostName:] in libStylusCore.a(STCReachability.o)
_SCNetworkReachabilityGetFlags, referenced from:
-[STCReachability connectionRequired] in libStylusCore.a(STCReachability.o)
-[STCReachability currentReachabilityStatus] in libStylusCore.a(STCReachability.o)
_SCNetworkReachabilityScheduleWithRunLoop, referenced from:
-[STCReachability startNotifier] in libStylusCore.a(STCReachability.o)
_SCNetworkReachabilitySetCallback, referenced from:
-[STCReachability startNotifier] in libStylusCore.a(STCReachability.o)
_SCNetworkReachabilityUnscheduleFromRunLoop, referenced from:
-[STCReachability stopNotifier] in libStylusCore.a(STCReachability.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

1 Comment

Thanks for your error report.
As Swift code works side-by-side with Objective-C, there is no reason you can not use our iOS ATK with Swift. There's no dedicated tutorial, but similar post may help:
http://developer-support.myscript.com/support/discussions/topics/16000007683

Could you please check the Xcode build settings? Remove ‘All load’ flag, in Xcode settings –> Other Link and set -undefined dynamic_lookup as Other Linker Flags parameter
Please let us know if it helps.

Login or Signup to post a comment