fix: SPM correct platform for iOS
The problem
Currently, our Capacitor updater requires iOS 15.5 as the minimum iOS deployment target. Unfortunately, when using SPM, the Capacitor CLI will always default to iOS 15, regardless of whether iOS 15.5 is set in Xcode build settings. This is problematic and causes build issues.
The problem was first reported here: https://discord.com/channels/912707985829163099/1450088141997215744
Motivation
The Capacitor CLI should work with our own plugin when using SPM. This is a high priority issue as this is currently preventing some users from using Capgo. We must fix it as soon as possible
Business impact
HIGH ❗️
This issue is currently preventing some users from using Capgo, which could negatively impact our MMR. This MUST ne resolved as sonn as possible
Documentation used
https://developer.apple.com/documentation/packagedescription/supportedplatform/ios(_:)-83bbf
I use .iOS("15.5") when a dot version is detected, iOS(.v15) if no dot version is detected. This is required by Apple
Testing
I tested manually. If the test app is required, I will provide a zip of it.
Lint
I did not lint. This project differs from a typical Capgo project and the lint command did not work.
Summary by CodeRabbit
- Bug Fixes
- Improved iOS deployment target detection for more robust build configuration parsing.
- Enhanced Package.swift platform version generation with better format handling.
✏️ Tip: You can customize this high-level summary in your review settings.