@@ -31,10 +31,12 @@ struct SetEventHandlerArgs: Decodable {
31
31
@objc public func getCurrent( _ invoke: Invoke ) throws {
32
32
var ret = JSObject ( )
33
33
ret [ " url " ] = self . currentUrl
34
+ Logger . info ( " getCurrent: \( String ( describing: ret) ) " )
34
35
invoke. resolve ( ret)
35
36
}
36
37
37
- // JS command: set the JS callback handler channel
38
+ // This command should not be added to the `build.rs` and exposed as it is only
39
+ // used internally from the rust backend.
38
40
@objc public func setEventHandler( _ invoke: Invoke ) throws {
39
41
let args = try invoke. parseArgs ( SetEventHandlerArgs . self)
40
42
self . channel = args. handler
@@ -64,33 +66,34 @@ struct SetEventHandlerArgs: Decodable {
64
66
class AppDelegate : UIResponder , UIApplicationDelegate {
65
67
func application( _ app: UIApplication , open url: URL , options: [ UIApplication . OpenURLOptionsKey : Any ] = [ : ] ) -> Bool {
66
68
DeepLinkPlugin . handleOpenUrl ( url)
69
+ Logger . info ( " AppDelegate: Opened URL: \( url) " )
67
70
return true
68
71
}
69
72
}
70
73
71
74
72
75
73
- class SceneDelegate : UIResponder , UIWindowSceneDelegate {
76
+ // class SceneDelegate: UIResponder, UIWindowSceneDelegate {
74
77
75
- var window : UIWindow ?
78
+ // var window: UIWindow?
76
79
77
- // Called when a scene is being created and connected
78
- func scene( _ scene: UIScene ,
79
- willConnectTo session: UISceneSession ,
80
- options connectionOptions: UIScene . ConnectionOptions ) {
80
+ // // Called when a scene is being created and connected
81
+ // func scene(_ scene: UIScene,
82
+ // willConnectTo session: UISceneSession,
83
+ // options connectionOptions: UIScene.ConnectionOptions) {
81
84
82
- // Handle initial URL if app was launched via a deep link
83
- if let urlContext = connectionOptions. urlContexts. first {
84
- DeepLinkPlugin . handleOpenUrl ( urlContext. url)
85
- }
86
- }
85
+ // // Handle initial URL if app was launched via a deep link
86
+ // if let urlContext = connectionOptions.urlContexts.first {
87
+ // DeepLinkPlugin.handleOpenUrl(urlContext.url)
88
+ // }
89
+ // }
87
90
88
- // Called when the app receives a deep link while already running
89
- func scene( _ scene: UIScene , openURLContexts URLContexts: Set < UIOpenURLContext > ) {
90
- guard let url = URLContexts . first? . url else { return }
91
- DeepLinkPlugin . handleOpenUrl ( url)
92
- }
93
- }
91
+ // // Called when the app receives a deep link while already running
92
+ // func scene(_ scene: UIScene, openURLContexts URLContexts: Set<UIOpenURLContext>) {
93
+ // guard let url = URLContexts.first?.url else { return }
94
+ // DeepLinkPlugin.handleOpenUrl(url)
95
+ // }
96
+ // }
94
97
95
98
@_cdecl ( " init_plugin_deep_link " )
96
99
func initPlugin( ) -> Plugin {
0 commit comments