Adonit / LAMY-iPadOS-SDK

0 stars 0 forks source link

podspec ObjC linker flag #9

Open AlexanderThiele opened 2 months ago

AlexanderThiele commented 2 months ago

When calling LamyStylusManager.sharedInstance().startDiscoveryAndImmediatelyConnect(...)

I get the following error

*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSTaggedPointerString lamyModelValue]: unrecognized selector sent to instance 0xb619603e75af6dd3'
*** First throw call stack:
(0x189b68f20 0x181a52018 0x189c72480 0x189b05fb4 0x189b058d0 0x105bc6964 0x105bc68e8 0x105bc6810 0x1aefa3b5c 0x1aefa2710 0x1aefa25f4 0x1aefa24a0 0x105b00b98 0x105b027bc 0x105b0a66c 0x105b0b43c 0x105b0a4a4 0x105b0b408 0x105b18404 0x105b17a38 0x1e691a934 0x1e69170cc)
libc++abi: terminating due to uncaught exception of type NSException

i recently found out it's the missing -ObjC linker flag inside my podspec file. But how do i add it?

My first question is: why do i need the flag anyway? is it really because the lib is still developed in Objective C? Why not Swift right away?

i'm now searching for a while to enable the linker flag -ObjC in my podspec file, but it's difficult to find an answer.

Any idea @adonitDevel ?

adonitDevel commented 1 month ago

Hi @AlexanderThiele, Yes, This SDK is built with object C at this moment. We started this SDK couple years ago and at that time, we were using object C.

And Can you try adding the below line in your podspec file spec.pod_target_xcconfig = { 'OTHER_LDFLAGS' => '-ObjC' }

Thanks