We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 520415c commit 7fed0beCopy full SHA for 7fed0be
Leanplum-SDK/Classes/LPMessageTemplates.m
@@ -323,7 +323,12 @@ - (void)defineActions
323
withResponder:^BOOL(LPActionContext *context) {
324
@try {
325
dispatch_async(dispatch_get_main_queue(), ^{
326
- [[UIApplication sharedApplication] openURL:[NSURL URLWithString:[context stringNamed:LPMT_ARG_URL]]];
+ NSURL *url = [NSURL URLWithString:[context stringNamed:LPMT_ARG_URL]];
327
+ if ([[UIApplication sharedApplication] respondsToSelector:@selector(openURL:options:completionHandler:)]) {
328
+ [[UIApplication sharedApplication] openURL:url options:@{} completionHandler:nil];
329
+ } else {
330
+ [[UIApplication sharedApplication] openURL:url];
331
+ }
332
});
333
return YES;
334
}
0 commit comments