Swift Mac Catalyst

// Expert user has replied.
Y Yanis Dalabiras 3 years 5 months ago
25 4 0

I am using the Zebra libZSDK_API.a in my Swift application. I created the objective c bridging header and it is working properly on my iOS and iPad OS devices. I am building the app for Mac Catalyst now and I am getting this error. What can I do to get this fixed? The Mac users will not be using the printer function so is there a way I can disable it for Mac Users?
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_MfiBtPrinterConnection", referenced from:
objc-class-ref in PrintManager.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Please Register or Login to post a reply

4 Replies

S Steven Si

The error msg indicates that the error was detected at the linking stage. If libZSDK_API.a can be removed from the library list for the linker, we may be able to get around with this error. Depending on the code structure, maybe other issues may arise.

W William Mays

Yes, I understand it is only for iOS. Is there anyway I can exclude the libZSDK_API.a library from compiling from a universal Xcode project ?

S Steven Si

Hi William, unfortunately, the libZSDK_API.a library is built and tested for iOS. It's never been tested and intended for Mac OS. As the error msg above indicates that the Bluetooth connection class was built on iOS ExternalAccessory Framework, which is not available Mac OS. We cannot use the libZSDK_API.a for Mac Catalyst.

W William Mays

Yes, I do not want to use it with Mac just iOS. Under "Link Binary With Library" I have iOS selected as platform, not macOS + iOS, but for some reason it is still trying to compile when using mac and I do not need it to

CONTACT
Can’t find what you’re looking for?