Skip to content

Commit 1cee35d

Browse files
authored
fix(ios): replace deprecated UIApplication.shared.openUrl method call (#10627)
1 parent 0506012 commit 1cee35d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/core/utils/index.ios.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Trace } from '../trace';
2-
import { ios as iOSUtils } from './native-helper';
2+
import { dataSerialize, ios as iOSUtils } from './native-helper';
33

44
export { clearInterval, clearTimeout, setInterval, setTimeout } from '../timer';
55
export * from './common';
@@ -39,7 +39,8 @@ export function openUrl(location: string): boolean {
3939
try {
4040
const url = NSURL.URLWithString(location.trim());
4141
if (UIApplication.sharedApplication.canOpenURL(url)) {
42-
return UIApplication.sharedApplication.openURL(url);
42+
UIApplication.sharedApplication.openURLOptionsCompletionHandler(url, dataSerialize({}), null);
43+
return true;
4344
}
4445
} catch (e) {
4546
// We Don't do anything with an error. We just output it

0 commit comments

Comments
 (0)