Amplitude-iOS icon indicating copy to clipboard operation
Amplitude-iOS copied to clipboard

fix: restore ability to build as a standalone static lib

Open crleona opened this issue 10 months ago • 0 comments

Summary

Our Unreal SDK was previously linked against a statically built version of v8.1.0 of this SDK, and we've since added several updates. The following changes are required to maintain compatibility with Unreal:

  • Adds a new Static Library build configuration, which compiles targets as individual static libraries vs dynamic libraries intended for use in frameworks
  • Added the ability to exclude analytics connector for these static library builds, as experiment is not supported on the platform and it adds to linking complexity. To accomplish this we move the dependency for analytics connector from carthage to cocoapods, which allows us to only include it in certain configurations. I'm not sure why we decided to split dependencies between carthage and cocoapods in the first place.
  • adds missing type annotations to AMPMiddlewarePayload
  • AMPServerZone values are unprefixed, so we have US and EU global constants ☹️. These conflict with constants in Unreal. We add a compiler flag to actually use prefixed versions in certain environments since we can't break backwards compatibility.
  • adds a quick generated build script
  • cleans up some invalid project references

Checklist

  • [x] Does your PR title have the correct title format?
  • Does your PR have a breaking change?: yes

crleona avatar Jun 13 '25 17:06 crleona