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

fix: add swift version in podspec #210

Conversation

martin-headspace
Copy link
Contributor

What's Changed

Added the swift_version to the Podspec to help developers with an add-to-app setup not run into the missing SWIFT_VERSION error when compiling.

Rationale

When using this plugin on a project that is being compiled for the add-to-app approach in Flutter, developers will usually get this error:

 - amplitude_flutter does not specify a Swift version and none of the targets (Runner) integrating it have the SWIFT_VERSION attribute set. Please contact the author or set the SWIFT_VERSION attribute in at least one of the targets that integrate this pod.

To fix this, developers have to go into their generated Podspec and add the SWIFT_VERSION environment variable for the build to work. This is not an ideal workflow.

By adding the Swift Version to the Podspec, builds compile without a hitch.

Copy link
Contributor

@chungdaniel chungdaniel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @martin-headspace for adding this! We should also change the commit to be fix: rather than chore: so that it'll trigger a build/release.

Some extra context: We're working on releasing a 4.x of our Flutter SDK which will point to our iOS Swift SDK, which will use a swift_version of '5.9'. I've made a note to add this change to our beta branch for including a swift_version for 4.x

ios/amplitude_flutter.podspec Outdated Show resolved Hide resolved
@martin-headspace martin-headspace force-pushed the chore/add-swift-version-in-pubspec branch from 3be9afd to ac6919f Compare January 2, 2025 19:44
@martin-headspace martin-headspace changed the title chore: add swift version in podspec fix: add swift version in podspec Jan 2, 2025
ios/amplitude_flutter.podspec Outdated Show resolved Hide resolved
Adds the Swift Version to the Podspec to help developers with an add-to-app setup not run into the missing SWIFT_VERSION error when compiling.
@martin-headspace martin-headspace force-pushed the chore/add-swift-version-in-pubspec branch from ac6919f to 916f027 Compare January 2, 2025 19:54
@chungdaniel chungdaniel merged commit e702ee5 into amplitude:main Jan 2, 2025
justin-fiedler pushed a commit that referenced this pull request Jan 2, 2025
## [3.16.6](v3.16.5...v3.16.6) (2025-01-02)

### Bug Fixes

* add swift version in podspec ([#210](#210)) ([e702ee5](e702ee5))
Copy link

github-actions bot commented Jan 2, 2025

🎉 This PR is included in version 3.16.6 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

2 participants