Skip to content

Commit 453e70d

Browse files
robhoganfacebook-github-bot
authored andcommitted
Replace deprecated completion block
Summary: `UIActivityViewConroller.completionHandler` has been [deprecated](https://developer.apple.com/reference/uikit/uiactivityviewcontroller/1622010-completionhandler) since iOS 8, when it was replaced by `completionWithItemsHandler`. Tested the build using `UIExplorer` and XCode 8.2 but I've never seen and can't work out how to activate the `UIActivityViewController` this method relates to, so I haven't tested a real run. Closes #11798 Differential Revision: D4396618 fbshipit-source-id: 92a993c434637ede2d5779f4154feb00d2c78d06
1 parent 2d8a287 commit 453e70d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

React/Profiler/RCTProfile.m

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,10 @@ + (void)toggle:(UIButton *)target
383383
#if !TARGET_OS_TV
384384
UIActivityViewController *activityViewController = [[UIActivityViewController alloc] initWithActivityItems:@[[NSURL fileURLWithPath:outFile]]
385385
applicationActivities:nil];
386-
activityViewController.completionHandler = ^(__unused NSString *activityType, __unused BOOL completed) {
386+
activityViewController.completionWithItemsHandler = ^(__unused UIActivityType activityType,
387+
__unused BOOL completed,
388+
__unused NSArray *items,
389+
__unused NSError *error) {
387390
RCTProfileControlsWindow.hidden = NO;
388391
};
389392
RCTProfileControlsWindow.hidden = YES;

0 commit comments

Comments
 (0)