Skip to content

Commit 1844c70

Browse files
authored
Fix FTAViewController incorrectly calling [UIApplication openURL] on a non-main thread (#461)
1 parent 46c31ce commit 1844c70

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

testing/sample_framework/src/ios/ios_app_framework.mm

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,11 @@ - (void)viewDidLoad {
9090
delete[] argv[0];
9191
argv[0] = nullptr;
9292
[NSThread sleepForTimeInterval:kGameLoopSecondsToPauseBeforeQuitting];
93-
[UIApplication.sharedApplication openURL:[NSURL URLWithString:kGameLoopCompleteUrlScheme]
94-
options:[NSDictionary dictionary]
95-
completionHandler:nil];
96-
93+
dispatch_async(dispatch_get_main_queue(), ^{
94+
[UIApplication.sharedApplication openURL:[NSURL URLWithString:kGameLoopCompleteUrlScheme]
95+
options:[NSDictionary dictionary]
96+
completionHandler:nil];
97+
});
9798
});
9899
}
99100

0 commit comments

Comments
 (0)