Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation error after migration from 8.5 to 10.0 #272

Open
marekhac opened this issue Nov 7, 2024 · 4 comments
Open

Compilation error after migration from 8.5 to 10.0 #272

marekhac opened this issue Nov 7, 2024 · 4 comments

Comments

@marekhac
Copy link

marekhac commented Nov 7, 2024

Hi! I can't migrate from the ver. 8.5 to 10.0. My app needs to be run on iOS 13.0. I'm using Xcode 15.4 and updated SwrveSDK using SPM. I've updated the code to use new methods, but the project doesn't build. I've got a bunch of errors like this:

swrve

Have you got any clue, what can be wrong ? Thanks in advance.

Undefined symbols for architecture arm64:
  "__swift_FORCE_LOAD_$_swiftXPC", referenced from:
      __swift_FORCE_LOAD_$_swiftXPC_$_SwrveSDK in SwrveSDK(SwrveResourceManager.o)
      __swift_FORCE_LOAD_$_swiftXPC_$_SwrveSDK in SwrveSDK(SwrveInAppCampaign.o)
      __swift_FORCE_LOAD_$_swiftXPC_$_SwrveSDK in SwrveSDK(SwrveCampaign.o)
      __swift_FORCE_LOAD_$_swiftXPC_$_SwrveSDK in SwrveSDK(SwrvePushInboxResult.o)
      __swift_FORCE_LOAD_$_swiftXPC_$_SwrveSDK in SwrveSDK(SwrveMessageButtonDetails.o)
      __swift_FORCE_LOAD_$_swiftXPC_$_SwrveSDK in SwrveSDK(SwrveMessageDetails.o)
      __swift_FORCE_LOAD_$_swiftXPC_$_SwrveSDK in SwrveSDK(SwrveEmbeddedMessageConfig.o)
      ...
     (maybe you meant: __swift_FORCE_LOAD_$_swiftXPC_$_SwrveSDK)
  "__swift_FORCE_LOAD_$_swift_Builtin_float", referenced from:
      __swift_FORCE_LOAD_$_swift_Builtin_float_$_SwrveSDK in SwrveSDK(SwrveResourceManager.o)
      __swift_FORCE_LOAD_$_swift_Builtin_float_$_SwrveSDK in SwrveSDK(SwrveInAppCampaign.o)
      __swift_FORCE_LOAD_$_swift_Builtin_float_$_SwrveSDK in SwrveSDK(SwrveCampaign.o)
      __swift_FORCE_LOAD_$_swift_Builtin_float_$_SwrveSDK in SwrveSDK(SwrvePushInboxResult.o)
      __swift_FORCE_LOAD_$_swift_Builtin_float_$_SwrveSDK in SwrveSDK(SwrveMessageButtonDetails.o)
      __swift_FORCE_LOAD_$_swift_Builtin_float_$_SwrveSDK in SwrveSDK(SwrveMessageDetails.o)
      __swift_FORCE_LOAD_$_swift_Builtin_float_$_SwrveSDK in SwrveSDK(SwrveEmbeddedMessageConfig.o)
      ...
@KevBrodigan
Copy link
Contributor

Hi @marekhac

Thanks for raising the issue. Looks like a compatible issue between our SDK been compiled in Xcode 16 and attempting to use it in Xcode 15.4, which we will review further.

In the meantime, is it possible for you to upgrade and try it with Xcode 16?

@marekhac
Copy link
Author

marekhac commented Nov 7, 2024

Thanks @KevBrodigan for answer. I've made a quick test and created a fresh app on Xcode 15.2 (yes, this is exact version that I'm using). Next I've added SwrveSDK SDK 10.0 using SPM, and the pin this library to the target. And it works! So I started to search for settings in my project that can collide with SwrveSDK. And after adding -ObjC in Other Linker Flags I got the same errors. Unfortunately I cannot use Xcode 16 :(

@KevBrodigan
Copy link
Contributor

@marekhac So just to clarify, if you remove -ObjC, does it work for your project?

Is that a viable workaround for you?

@marekhac
Copy link
Author

marekhac commented Nov 8, 2024

@KevBrodigan Yes, removing the -ObjC flag will do the job for the test app. Interestingly, on Xcode 16 (with the -ObjC flag added), the project builds successfully as well. So, I think the problem is more related to Xcode 15 and the fact that the new SwrveSDK was built using Xcode 16 (as you mentioned before).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants