gpt4 book ai didi

ios - Swift 3 - 线程 1 : EXC_BAD_INSTRUCTION (code = EXC_I386_INVOP, 子代码 = 0x0)

转载 作者:可可西里 更新时间:2023-11-01 02:10:50 26 4
gpt4 key购买 nike

我正在尝试使用 AWS Cognito 作为后端将用户身份验证功能添加到我的应用程序中。

到目前为止,每当我的应用程序尝试构建时我都会收到此错误,当它构建时它指向我的两个类中的这些错误。

AWSMobileClient 类:

func didFinishLaunching(application: UIApplication, withOptions launchOptions: [NSObject : AnyObject]?) -> Bool {
print("didFinishLaunching:")


let didFinishLaunching = AWSIdentityManager.defaultIdentityManager().interceptApplication(application, didFinishLaunchingWithOptions: launchOptions)

if (!isInitialized) {
AWSIdentityManager.defaultIdentityManager().resumeSession(completionHandler: {(_ result: AnyObject, _ error: Error) -> Void in
print("result = \(result), error = \(error)")
} as! (Any?, Error?) -> Void) --> ERROR ON THIS LINE <--
isInitialized = true
}
return didFinishLaunching
}

AppDelegate 类:

    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
return AWSMobileClient.sharedInstance.didFinishLaunching(application: application, withOptions: launchOptions as [NSObject : AnyObject]?) --> ERROR ON THIS LINE <--

最佳答案

看起来 AWS MobileHub 示例代码还不兼容 swift3——这正是我遇到的问题;也许你也是?参见 here从 AWS 获得答案,以及使用旧版编译器设置的提示(我还没有整理好...)

关于ios - Swift 3 - 线程 1 : EXC_BAD_INSTRUCTION (code = EXC_I386_INVOP, 子代码 = 0x0),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40987715/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com