Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions packages/device_info_plus/device_info_plus/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ examples/all_plugins/pubspec.yaml

.build/
Podfile
!example/ios/Podfile
!example/macos/Podfile
Podfile.lock
Pods/
.swiftpm/
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
platform :ios, '15.0'
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
Expand All @@ -469,7 +469,7 @@
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -579,7 +579,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand Down Expand Up @@ -628,7 +628,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
Expand All @@ -648,7 +648,7 @@
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand All @@ -671,7 +671,7 @@
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
platform :osx, '15.0'
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.14;
MACOSX_DEPLOYMENT_TARGET = 15.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = macosx;
SWIFT_COMPILATION_MODE = wholemodule;
Expand Down Expand Up @@ -632,7 +632,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.14;
MACOSX_DEPLOYMENT_TARGET = 15.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
Expand Down Expand Up @@ -679,7 +679,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.14;
MACOSX_DEPLOYMENT_TARGET = 15.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = macosx;
SWIFT_COMPILATION_MODE = wholemodule;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Downloaded by pub (not CocoaPods).
s.source_files = 'device_info_plus/Sources/device_info_plus/**/*.{h,m}'
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'
Copy link

Copilot AI Apr 28, 2026

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES' }
s.resource_bundles = {'device_info_plus_privacy' => ['device_info_plus/Sources/device_info_plus/PrivacyInfo.xcprivacy']}
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,16 @@ - (void)handleMethodCall:(FlutterMethodCall *)call
isiOSAppOnMac = [NSNumber numberWithBool:[info isiOSAppOnMac]];
}
NSNumber *isiOSAppOnVision = [NSNumber numberWithBool:NO];
if (@available(iOS 26.1, *)) {
isiOSAppOnVision = [NSNumber numberWithBool:[info isiOSAppOnVision]];
if (@available(iOS 15.0, *)) {
if (@available(iOS 26.1, *)) {
SEL isiOSAppOnVisionSelector = NSSelectorFromString(@"isiOSAppOnVision");
if ([info respondsToSelector:isiOSAppOnVisionSelector]) {
BOOL (*isiOSAppOnVisionIMP)(id, SEL) =
(BOOL (*)(id, SEL))[info methodForSelector:isiOSAppOnVisionSelector];
isiOSAppOnVision =
[NSNumber numberWithBool:isiOSAppOnVisionIMP(info, isiOSAppOnVisionSelector)];
}
Comment on lines +34 to +42
Copy link

Copilot AI Apr 28, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
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]];

Copilot uses AI. Check for mistakes.
}
}
NSError *error = nil;
NSDictionary *fsAttributes = [[NSFileManager defaultManager] attributesOfFileSystemForPath:NSHomeDirectory() error:&error];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ https://github.com/flutter/flutter/issues/46618
s.dependency 'FlutterMacOS'

s.platform = :osx
s.osx.deployment_target = '10.14'
s.osx.deployment_target = '15.0'
s.resource_bundles = {'device_info_plus_privacy' => ['device_info_plus/Sources/device_info_plus/PrivacyInfo.xcprivacy']}
end
Loading