Home Articles

Twitter登录 - 应用程序代理和应用程序崩溃中的线程1 Sigabrt错误

Asked
Viewed 1953 times
1

我正在尝试创建一个简单的解析日志,它将 TwitterFacebook 集成为 iOS9 中的登录选项 . Facebook 登录工作正常,但 Twitter 登录保持 crashing 并且不明白为什么?事故导致 AppDelegate.swift 说有一个 Sigabrt error "thread 1 signal sigabrt"

import UIKit

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {

var window: UIWindow?

func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
    // Override point for customization after application launch.
    Parse.setApplicationId("<MY ID>", clientKey:"<MY CLIENT KEY>")
    PFTwitterUtils.initializeWithConsumerKey("<CONSUMER KEY>", consumerSecret:"<CONSUMER SECRET>")
    PFFacebookUtils.initializeFacebookWithApplicationLaunchOptions(launchOptions);

NorthernLights [4119:358454] 由于未捕获的异常'NSInvalidArgumentException'而终止应用程序,原因:' - [NSPlaceholderDictionary initWithObjects:forKeys:count:]:尝试从对象插入nil对象[0]'***第一次调用stack:(0 CoreFoundation 0x000000010d751e65 __exceptionPreprocess 165 1 libobjc.A.dylib 0x000000010dadddeb objc_exception_throw 48 2 CoreFoundation 0x000000010d6548ce - [__ NSPlaceholderDictionary initWithObjects:forKeys:count:] 318 3 CoreFoundation 0x000000010d666c3b [NSDictionary dictionaryWithObjects:forKeys:count:] 59 4 NorthernLights 0x000000010a77f349 - [PF_Twitter _showWebViewDialogAsync:requestSecret:] 265 5个NorthernLights 0x000000010a78255a __38- [PF_Twitter _performWebViewAuthAsync] _block_invoke_2 346 6 libdispatch.dylib 0x000000010e59be5d _dispatch_call_block_and_release 12 7 libdispatch.dylib 0x000000010e5bc49b _dispatch_client_callout 8 8 libdispatch.dylib 0x000000010e5a42af _dispatch_main_queue_callback_4CF 1738 9 COREF oundation 0x000000010d6b1d09 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE 9 10的CoreFoundation 0x000000010d6732c9 __CFRunLoopRun 2073 11的CoreFoundation 0x000000010d672828 CFRunLoopRunSpecific 488个12 GraphicsServices 0x000000010f236ad2 GSEventRunModal 161 13的UIKit 0x000000010bf52610 UIApplicationMain 171个14 NorthernLights 0x000000010a5c90fd主109 15 libdyld.dylib 0x000000010e5f092d启动116 ??? 0x0000000000000001 0x0 1)libc abi.dylib:以NSException类型的未捕获异常终止(lldb)

1 Answer

  • 0

    这是我的错误完全相同的问题(Xcode 7.2最新的Parse SDK)Facebook登录工作,并在使用按钮功能中的Parse提供的Swift代码按下TwitterLogin按钮后立即获得错误

    我希望有人能回答这个问题 . 甚至教授这个的youTube和Udemy课程也使用旧版本的xcode或解析SDK,这些版本在他们的课程中有效但不在我的应用程序中 .

Related