Skip to content
Open
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: 1 addition & 1 deletion packages/share_plus/share_plus/ios/share_plus.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Downloaded by pub (not CocoaPods).
s.dependency 'Flutter'
s.ios.weak_framework = 'LinkPresentation'

s.platform = :ios, '12.0'
s.platform = :ios, '13.0'
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES' }
s.resource_bundles = {'share_plus_privacy' => ['share_plus/Sources/share_plus/PrivacyInfo.xcprivacy']}
end
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,18 @@
static NSString *const PLATFORM_CHANNEL = @"dev.fluttercommunity.plus/share";

static UIViewController *RootViewController(void) {
if (@available(iOS 13, *)) { // UIApplication.keyWindow is deprecated
NSSet *scenes = [[UIApplication sharedApplication] connectedScenes];
for (UIScene *scene in scenes) {
if ([scene isKindOfClass:[UIWindowScene class]]) {
NSArray *windows = ((UIWindowScene *)scene).windows;
for (UIWindow *window in windows) {
if (window.isKeyWindow) {
return window.rootViewController;
}
NSSet *scenes = [[UIApplication sharedApplication] connectedScenes];
for (UIScene *scene in scenes) {
if ([scene isKindOfClass:[UIWindowScene class]]) {
NSArray *windows = ((UIWindowScene *)scene).windows;
for (UIWindow *window in windows) {
if (window.isKeyWindow) {
return window.rootViewController;
}
}
}
return nil;
} else {
return [UIApplication sharedApplication].keyWindow.rootViewController;
}
return nil;
}

static UIViewController *
Expand Down
Loading