Skip to content

Commit bbbf68e

Browse files
wip: restrict external urls
1 parent 467725f commit bbbf68e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

ios/Runner/AppDelegate.swift

+8
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,14 @@ import UserNotifications
2828
)
2929
}
3030

31+
// Allow only `zulip://login` external urls.
32+
override func application(_ application: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {
33+
if url.scheme == "zulip" && url.host == "login" {
34+
return super.application(application, open: url, options: options)
35+
}
36+
return false
37+
}
38+
3139
// Handle notification tap while the app is running.
3240
override func userNotificationCenter(
3341
_ center: UNUserNotificationCenter,

0 commit comments

Comments
 (0)