fix(device_info_plus): update iOS/macOS deployment targets to 15.0 and fix isiOSAppOnVision detection#3812
fix(device_info_plus): update iOS/macOS deployment targets to 15.0 and fix isiOSAppOnVision detection#3812Melsaeed276 wants to merge 6 commits intofluttercommunity:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates device_info_plus Apple platform minimum deployment targets and adjusts the iOS implementation to detect isiOSAppOnVision more defensively at runtime.
Changes:
- Raise iOS minimum deployment target to 15.0 (podspec + example Xcode project).
- Raise macOS minimum deployment target to 15.0 (macOS podspec).
- Update
isiOSAppOnVisionlookup to add runtime gating via@available+respondsToSelector:.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| packages/device_info_plus/device_info_plus/macos/device_info_plus.podspec | Bumps macOS deployment target to 15.0. |
| packages/device_info_plus/device_info_plus/ios/device_info_plus/Sources/device_info_plus/FPPDeviceInfoPlusPlugin.m | Adds runtime checks around isiOSAppOnVision access. |
| packages/device_info_plus/device_info_plus/ios/device_info_plus.podspec | Bumps iOS deployment target to 15.0. |
| packages/device_info_plus/device_info_plus/example/ios/Runner.xcodeproj/project.pbxproj | Updates the example app’s iOS deployment target to 15.0. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| if (@available(iOS 15.0, *)) { | ||
| if (@available(iOS 26.1, *)) { | ||
| if ([info respondsToSelector:@selector(isiOSAppOnVision)]) { | ||
| isiOSAppOnVision = [NSNumber numberWithBool:[info isiOSAppOnVision]]; | ||
| } |
There was a problem hiding this comment.
Since the podspec now sets the minimum iOS deployment target to 15.0, the outer @available(iOS 15.0, *) check is redundant (all supported runtimes satisfy it) and adds unnecessary nesting. Consider removing the iOS 15 availability guard and keeping only the version/selector checks that can actually vary at runtime.
| if (@available(iOS 15.0, *)) { | |
| if (@available(iOS 26.1, *)) { | |
| if ([info respondsToSelector:@selector(isiOSAppOnVision)]) { | |
| isiOSAppOnVision = [NSNumber numberWithBool:[info isiOSAppOnVision]]; | |
| } | |
| if (@available(iOS 26.1, *)) { | |
| if ([info respondsToSelector:@selector(isiOSAppOnVision)]) { | |
| isiOSAppOnVision = [NSNumber numberWithBool:[info isiOSAppOnVision]]; |
| s.public_header_files = 'device_info_plus/Sources/device_info_plus/include/**/*.h' | ||
| s.dependency 'Flutter' | ||
| s.platform = :ios, '12.0' | ||
| s.platform = :ios, '15.0' |
There was a problem hiding this comment.
Raising the minimum iOS/macOS deployment targets is a breaking change for plugin consumers, but the PR title doesn’t include the Conventional Commits breaking-change marker (!) and the PR description’s breaking-change checklist is contradictory (both Yes and No checked). Please align the PR metadata (title/description) with the actual breaking nature of this change.
…lus.podspec Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…s/Sources/device_info_plus/FPPDeviceInfoPlusPlugin.m Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
This change makes no sense and not useful. |
Description
This PR updates the minimum deployment targets and improves the
isiOSAppOnVisiondetection:12.0to15.010.14to15.0@available(iOS 26.1, *)to runtime detection using@available(iOS 15.0, *)+@available(iOS 26.1, *)+respondsToSelector:. This ensures theisiOSAppOnVisionproperty is correctly detected at runtime without causing compile-time warnings on older SDKs.Related Issues
Checklist
CHANGELOG.mdnor the plugin version inpubspec.yamlfiles.flutter analyze) does not report any problems on my PR.Breaking Change
Does your PR require plugin users to manually update their apps to accommodate your change?
!in the title as explained in Conventional Commits).