Leanplum / Leanplum-iOS-SDK

Leanplum's integrated solution delivers meaningful engagement across messaging and the in-app experience.
https://www.leanplum.com
Apache License 2.0
71 stars 59 forks source link

6.4.0 and 6.4.1 fail to build with error `__swift_FORCE_LOAD_$_swiftXPC_$_Leanplum in Leanplum[arm64][75](MigrationManager+Constants.o)` #588

Closed adam-fallon closed 1 month ago

adam-fallon commented 1 month ago

Expected Behavior

Project using this SDK builds when ingested using SPM and following instructions in the Leanplum iOS documentation.

Actual Behavior

Project fails to build with error;

ld: warning: search path '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.0.sdk/usr/lib/system' not found
ld: warning: Could not find or use auto-linked library 'swiftXPC': library 'swiftXPC' not found
ld: warning: Could not find or use auto-linked framework 'CoreAudioTypes': framework 'CoreAudioTypes' not found
ld: Undefined symbols:
  __swift_FORCE_LOAD_$_swiftXPC, referenced from:
      __swift_FORCE_LOAD_$_swiftXPC_$_Leanplum in Leanplum[arm64][75](MigrationManager+Constants.o)
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I did this in an existing project and it failed, so to rule out variance I created a completely brand new fresh project and got the exact same error.

I have flags -ObjC and -all_load on in Other Linker Flags (but apparently -all_load isn't supported anymore Apple have scrubbed mention of it from the internet)

Steps to Reproduce the Problem

  1. Install Leanplum SDK 6.4.0+ with SPM
  2. Run Project
  3. Project fails to build
  4. Change version to anything before 6.4.0 (for example 6.3.0, project builds)

Added a repro here, but really any brand new iOS project trying to integrate this SDK with SPM will do the same thing; LeanplumTest.zip

Specifications

distomin commented 1 month ago

I wanted to report this issue also. We are not going to update Xcode 15.3 because of troubles with Testflight. But Leanplum 6.4.0/6.4.1 works only on Xcode 15.3 for our project

@nzagorchev Is it expected behavior that those Leanpum versions don't work with Xcode 15.2?