【问题标题】:Urban Airship Crashes in 2.0城市飞艇在 2.0 中崩溃
【发布时间】:2013-09-17 11:02:55
【问题描述】:

我不断收到此错误

-----l- networkStatusForFlags
2013-09-05 12:35:58.196 Guess The Distance[9730:c07] [D] +[UAirship executeUnsafeTakeOff:] [Line 181] Deleting the keychain credentials
2013-09-05 12:35:58:281 Guess The Distance[9730:16387] TestFlight: Started Session
2013-09-05 12:35:58.846 Guess The Distance[9730:c07] [D] +[UAirship executeUnsafeTakeOff:] [Line 184] Deleting the UA device ID
2013-09-05 12:35:59.144 Guess The Distance[9730:c07] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** setObjectForKey: object cannot be nil (key: gena)'

这是我的代码:

//Add onto main thread queue to excute asyncrously and to prevent Urban Airship Crashing
dispatch_async(dispatch_get_main_queue(), ^{
    //Load Urban Airship
    DLog(@"Loading Urban Airship...");

    // Disable Push
    [[UAPush shared] setPushEnabled:NO];

    // Populate AirshipConfig.plist with your app's info from https://go.urbanairship.com
    // or set runtime properties here.
    UAConfig *config = [UAConfig defaultConfig];

    config.developmentAppKey = UADevelopmentKey;
    config.developmentAppSecret = UADevelopmentSecret;
    config.productionAppKey = UAProductionKey;
    config.productionAppSecret = UAProductionSecret;
    config.detectProvisioningMode = YES;

    #ifdef DEBUG
    config.clearKeychain = YES;
    #endif

    // Call takeOff (which creates the UAirship singleton)
    [UAirship takeOff:config];

    DLog(@"Finished Loading Urban Airship");
});

【问题讨论】:

    标签: ios urbanairship.com


    【解决方案1】:

    如果您在调用之前运行了任何城市飞艇代码,就会发生这种情况

        [UAirship takeOff:config];        
    

    我把我的代码放在这个语句之后,崩溃就消失了。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多