diff --git a/packages/share_plus/share_plus/example/ios/Flutter/AppFrameworkInfo.plist b/packages/share_plus/share_plus/example/ios/Flutter/AppFrameworkInfo.plist index 7c56964006..1dc6cf7652 100644 --- a/packages/share_plus/share_plus/example/ios/Flutter/AppFrameworkInfo.plist +++ b/packages/share_plus/share_plus/example/ios/Flutter/AppFrameworkInfo.plist @@ -21,6 +21,6 @@ CFBundleVersion 1.0 MinimumOSVersion - 12.0 + 13.0 diff --git a/packages/share_plus/share_plus/example/ios/Runner.xcodeproj/project.pbxproj b/packages/share_plus/share_plus/example/ios/Runner.xcodeproj/project.pbxproj index 2a3b6e0036..4d97ee1163 100644 --- a/packages/share_plus/share_plus/example/ios/Runner.xcodeproj/project.pbxproj +++ b/packages/share_plus/share_plus/example/ios/Runner.xcodeproj/project.pbxproj @@ -451,7 +451,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = iphoneos; @@ -578,7 +578,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -627,7 +627,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = iphoneos; diff --git a/packages/share_plus/share_plus/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/packages/share_plus/share_plus/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index 8e3ca5dfe1..e3773d42e2 100644 --- a/packages/share_plus/share_plus/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/packages/share_plus/share_plus/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -26,6 +26,7 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + customLLDBInitFile = "$(SRCROOT)/Flutter/ephemeral/flutter_lldbinit" shouldUseLaunchSchemeArgsEnv = "YES"> diff --git a/packages/share_plus/share_plus/ios/share_plus/Sources/share_plus/FPPSharePlusPlugin.m b/packages/share_plus/share_plus/ios/share_plus/Sources/share_plus/FPPSharePlusPlugin.m index 974602bd32..59b7e93ae7 100644 --- a/packages/share_plus/share_plus/ios/share_plus/Sources/share_plus/FPPSharePlusPlugin.m +++ b/packages/share_plus/share_plus/ios/share_plus/Sources/share_plus/FPPSharePlusPlugin.m @@ -420,10 +420,14 @@ + (void)share:(NSArray *)shareItems BOOL isCoordinateSpaceOfSourceView = CGRectContainsRect(controller.view.frame, origin); - // If device is e.g. an iPad then hasPopoverPresentationController is true + // Check if this is actually an iPad + BOOL isIpad = ([UIDevice currentDevice].userInterfaceIdiom == UIUserInterfaceIdiomPad); + + // Before Xcode 26 hasPopoverPresentationController is true for iPads and false for iPhones. + // Since Xcode 26 is true both for iPads and iPhones, so additional check was added above. BOOL hasPopoverPresentationController = [activityViewController popoverPresentationController] != NULL; - if (hasPopoverPresentationController && + if (isIpad && hasPopoverPresentationController && (!isCoordinateSpaceOfSourceView || CGRectIsEmpty(origin))) { NSString *sharePositionIssue = [NSString stringWithFormat: