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

[Feature]: Make iOS SPM platform version configurable #7544

Closed
1 of 3 tasks
rlepinski opened this issue Jul 2, 2024 · 4 comments · Fixed by #7556
Closed
1 of 3 tasks

[Feature]: Make iOS SPM platform version configurable #7544

rlepinski opened this issue Jul 2, 2024 · 4 comments · Fixed by #7556
Labels
cli platform: ios type: bug A confirmed bug report

Comments

@rlepinski
Copy link

rlepinski commented Jul 2, 2024

Description

Make iOS platform configurable when using SPM

Platforms

  • iOS
  • Android
  • Web

Request or proposed solution

Make it possible to specify the iOS platform version when using SPM.

Right now this template is used to generate an SPM file that pulls in all plugins (I think) -https://github.com/ionic-team/capacitor/blob/main/ios-spm-template/App/CapApp-SPM/Package.swift#L7, the issue it hardcodes the platform version to 13, so if any plugin requires a newer version the build fails:

Build description signature: 6a7936b36114b559756987b40a32458e
        Build description path:
        /Users/ryan.lepinski/git/capacitor-airship/example/ios/DerivedData/066711CA-4B15-4D77-AEBF-095C11722530/Build/Intermediates.noindex/XCBuildData/6a7936b36114b559756987b40a32458e.xcbuilddata
        error: The package product 'UaCapacitorAirship' requires minimum platform version 14.0 for the iOS platform, but
        this target supports 13.0 (in target 'CapApp-SPM' from project 'CapApp-SPM')
        ** BUILD FAILED **

If i modify the spm.js file that has that template embedded to use v14, build works as expected.

Alternatives

No response

Additional Information

You can install the @ua/capacitor-airship 2.0.0 plugin to reproduce this

The Package.swift with the issue:
https://github.com/urbanairship/capacitor-airship/blob/main/Package.swift

@jcesarmobile jcesarmobile added the needs reproduction needs reproducible example to illustrate the issue label Jul 3, 2024
Copy link

ionitron-bot bot commented Jul 3, 2024

This issue needs more information before it can be addressed. In particular, the reporter needs to provide a minimal sample app that demonstrates the issue. If no sample app is provided within 15 days, the issue will be closed.
Please see the Contributing Guide for how to create a Sample App.
Thanks! Ionitron 💙

@ionitron-bot ionitron-bot bot removed the triage label Jul 3, 2024
@Ionitron Ionitron added needs reply needs reply from the user and removed needs reply needs reply from the user labels Jul 3, 2024
@jcesarmobile jcesarmobile added the needs reply needs reply from the user label Jul 3, 2024
@rlepinski
Copy link
Author

Reproduced here - https://github.com/urbanairship/capacitor-airship/tree/spm-issue/example

npx cap build ios will produce the issue since its trying to pull in an SPM that is for iOS 14+ but the generated Package.swift is hardcoded to iOS 13

@Ionitron Ionitron removed the needs reply needs reply from the user label Jul 3, 2024
@jcesarmobile jcesarmobile added platform: ios type: bug A confirmed bug report and removed needs reproduction needs reproducible example to illustrate the issue labels Jul 4, 2024
Copy link

ionitron-bot bot commented Jul 4, 2024

This issue has been labeled as type: bug. This label is added to issues that that have been reproduced and are being tracked in our internal issue tracker.

Copy link

ionitron-bot bot commented Aug 11, 2024

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Capacitor, please create a new issue and ensure the template is fully filled out.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Aug 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cli platform: ios type: bug A confirmed bug report
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants