Questions tagged «iphone»

除非要专门针对Apple的iPhone和/或iPod touch,否则请勿使用此标签。对于不依赖于硬件的问题,请使用标签[ios]。需要考虑的更多标签是[xcode](但仅当问题与IDE本身有关时),[swift],[objective-c]或[cocoa-touch](但不包括[cocoa])。请避免有关iTunes App Store或iTunes Connect的问题。如果使用C#,请使用[mono]进行标记。

2
方法'scene(_:openURLContexts :)'未调用
在Info.plist文件我配置URL Identifier和URL Scheme成功。我也可以使用自定义网址打开应用。问题是应用首次启动时的方法 func scene(_ scene: UIScene, openURLContexts URLContexts: Set<UIOpenURLContext>) does not call. 我有一些基于上述方法的依赖功能。因此,当应用首次启动时,我无法在应用中看到任何内容。 我也在方法中添加了代码 func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { guard let _ = (scene as? UIWindowScene) else { return } let url = connectionOptions.urlContexts.first?.url } 但我在这里得到的网址为nil。 但是,如果我的应用程序处于后台模式并且点击了URL,则上述方法将成功调用并且相关功能可以正常工作。以下是我在中的scene(_:openURLContexts:)方法代码sceneDelegate。 func scene(_ scene: UIScene, openURLContexts URLContexts: …
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.