我想打開我的iOS應用程序和URL,但是當我將NSURL放入基金應用程序print()不起作用。Appdelegate print()不起作用
請參閱這裏
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
var openUrl:NSURL? //This is used when to save state when App is not running before the url trigered
func application(_ application: UIApplication, openURL url: NSURL, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
//print("Host: \(url.host!)")
//let url = url.standardized
//NotificationCenter.default.post(name: NSNotification.Name(rawValue: "HANDLEOPENURL"), object:url!)
print("bbb")
return true
}
}
,爲什麼你會使用'Foundation'而不是迅速? –
你是什麼意思_「application print()不起作用。」_?你期望看到什麼?你真的看到了什麼? –
@AshleyMills評論的附加內容:您是否收到任何警告/問題?我無法重現此錯誤 –