I integrated the math sdk inside a fresh swift project.
I configure the MAWMathViewController like this:
let resources = [math-ak.res, math-grm-maw.res]
let a = NSData(bytes: myCertificate.bytes, length: myCertificate.length)
mathViewController?.configureWithResources(resources, certificate: a)
But i got an error when compiling
Undefined symbols for architecture i386:
_myCertificate_BYTES, referenced from:
_myCertificate in ViewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
But an important point: if I'm deleting the configure code, there is no error.
p.s I have a bridging header file and I can see MAWMathViewController without a problem.
Can you help?
Thanks for your error report.
There is no specific guide for swift code. Other developers reported us some issues and the related posts may help you:
This thread about single line widget may help you as well:http://developer-support.myscript.com/support/discussions/topics/16000007706
Now it is working.
This is the solution I have:
let MyScriptBytes : [CChar] = [1, 2,...]
let certificateAsData = NSData(bytes: MyScriptBytes, length: MyScriptBytes.count)
Thanks for your feedback!