最近更新后无法连接解析

时间:2019-05-22 11:11:46

标签: ios swift xcode parse-platform

自最新更新以来,出现错误

  

“ libc ++ abi.dylib:以类型未捕获的异常终止   NSException   (lldb)”

每当我尝试连接进行解析

我什至无法执行像创建用户这样的简单任务,因为它将始终崩溃。我怀疑Xcode最近更新之后有什么变化,我无法弄清楚是什么。

我怀疑可能是libc++abi.dylib库不受支持,但是我不知道该怎么办。

这是我的View控制器

import UIKit

import Parse



class ViewController: UIViewController {



@IBOutlet var username: UITextField!

@IBOutlet var password: UITextField!



func displayAlert(title: String, message: String) {

let alertcontroller = UIAlertController(title: title, message: message, preferredStyle: .alert)

alertcontroller.addAction(UIAlertAction(title: "OK", style: .default, handler: nil))

self.present(alertcontroller, animated: true, completion: nil)

}



override func viewDidLoad() {

super.viewDidLoad()

// Do any additional setup after loading the view, typically from a nib.

}



@IBAction func signup(_ sender: Any) {

if username.text == "" || password.text == "" {

displayAlert(title: "Error in Form", message: "Please fill in the information")

} else {

let user = PFUser()

user.username = username.text

user.password = password.text

}

}



Here's my App Delegate

class AppDelegate: UIResponder, UIApplicationDelegate {

var window: UIWindow?

//--------------------------------------

// MARK: - UIApplicationDelegate

//--------------------------------------

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {

// Enable storing and querying data from Local Datastore.

// Remove this line if you don't want to use Local Datastore features or want to use cachePolicy.

Parse.enableLocalDatastore()



let parseConfiguration = ParseClientConfiguration(block: { (ParseMutableClientConfiguration) -> Void in

ParseMutableClientConfiguration.applicationId = "......"

ParseMutableClientConfiguration.clientKey = "......"

ParseMutableClientConfiguration.server = "........"

})



Parse.initialize(with: parseConfiguration)



这是错误

  

019-05-22 12:51:10.776625 + 0200   ParseStarterProject-Swift [18144:1046582] [MC]系统组容器   对于systemgroup.com.apple.configurationprofiles路径为   /Users/ejike/Library/Developer/CoreSimulator/Devices/8AAB1103-8B3E-4584-BFAE-170720DE4BEF/data/Containers/Shared/SystemGroup/systemgroup.com.apple.configurationprofiles

     

2019-05-22 12:51:10.780381 + 0200   ParseStarterProject-Swift [18144:1046582] [MC]私人阅读   有效的用户设置。

     

2019-05-22 12:51:23.291890 + 0200   ParseStarterProject-Swift [18144:1046582] ***由于以下原因终止了应用程序   未捕获的异常“ NSInternalInconsistencyException”,原因:“   PFUser类必须在使用之前向registerSubclass注册   解析。'

     

***首先抛出调用堆栈:

     

     

0 CoreFoundation 0x0000000107dad6fb __exceptionPreprocess + 331

     

1 libobjc.A.dylib 0x0000000107351ac5 objc_exception_throw + 48

     

2 CoreFoundation 0x0000000107dad555 + [NSException提高:格式:] + 197

     

3 ParseStarterProject-Swift 0x0000000105f5a7e1-[PFObject init] + 189

     

4 ParseStarterProject-Swift 0x0000000105f26533 $ sSo6PFUserCABycfcTO +   19

     

5 ParseStarterProject-Swift 0x0000000105f25bdf $ sSo6PFUserCABycfC + 31

     

6 ParseStarterProject-Swift 0x0000000105f25647   $ s25ParseStarterProject_Swift14ViewControllerC6signupyyypF + 1383

     

7 ParseStarterProject-Swift 0x0000000105f25c3c   $ s25ParseStarterProject_Swift14ViewControllerC6signupyyypFTo + 76

     

8 UIKitCore 0x0000000114799204-[UIApplication   sendAction:to:from:forEvent:] + 83

     

9 UIKitCore 0x00000001141eec19-[UIControl sendAction:to:forEvent:] +   67

     

10 UIKitCore 0x00000001141eef36-[UIControl   _sendActionsForEvents:withEvent:] + 450

     

11 UIKitCore 0x00000001141edeec-[UIControl touchesEnded:withEvent:] +   583

     

12 UIKitCore 0x00000001147d1eee-[UIWindow _sendTouchesForEvent:] +   2547

     

13 UIKitCore 0x00000001147d35d2-[UIWindow sendEvent:] + 4079

     

14 UIKitCore 0x00000001147b1d16-[UIApplication sendEvent:] + 356

     

15 UIKitCore 0x0000000114882293   __dispatchPreprocessedEventFromEventQueue + 3232

     

16 UIKitCore 0x0000000114884bb9 __handleEventQueueInternal + 5911

     

17 CoreFoundation 0x0000000107d14be1    CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 17

     

18 CoreFoundation 0x0000000107d14463 __CFRunLoopDoSources0 + 243

     

19 CoreFoundation 0x0000000107d0eb1f __CFRunLoopRun + 1231

     

20 CoreFoundation 0x0000000107d0e302 CFRunLoopRunSpecific + 626

     

21 GraphicsServices 0x000000010cf112fe GSEventRunModal + 65

     

22 UIKitCore 0x0000000114797ba2 UIApplicationMain + 140

     

23 ParseStarterProject-Swift 0x0000000105f27dab main + 75

     

24 libdyld.dylib 0x00000001091a3541开始+ 1

     

25 ??? 0x0000000000000001 0x0 +1

     

     

libc ++ abi.dylib:以类型未捕获的异常终止   NSException

     

(lldb)

0 个答案:

没有答案