Skip to content

Commit ae6330b

Browse files
authored
fix(share_plus): Avoid crash on iOS during file and text sharing in add-to-app scenario (#3738)
1 parent 81e4d66 commit ae6330b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/share_plus/share_plus/ios/share_plus/Sources/share_plus/FPPSharePlusPlugin.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -377,14 +377,14 @@ + (void)registerWithRegistrar:(NSObject<FlutterPluginRegistrar> *)registrar {
377377
withSubject:shareTitle
378378
withText:shareText
379379
excludedActivityTypes:excludedActivityTypes
380-
withController:rootViewController
380+
withController:topViewController
381381
atSource:originRect
382382
toResult:result];
383383
} else if (shareText) {
384384
[self shareText:shareText
385385
subject:shareTitle
386386
excludedActivityTypes:excludedActivityTypes
387-
withController:rootViewController
387+
withController:topViewController
388388
atSource:originRect
389389
toResult:result];
390390
} else {

0 commit comments

Comments
 (0)