0

このエラーが発生し続けます

-----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");
});
4

1 に答える 1

2

これは、への呼び出しの前に都市型飛行船のコードを実行していた場合に発生する可能性があります。

    [UAirship takeOff:config];        

このステートメントの後にコードを配置すると、クラッシュはなくなりました。

于 2013-09-17T03:02:55.637 に答える