城市飞艇与橘子酱SDK

时间:2014-03-12 14:09:48

标签: ios urbanairship.com marmalade

我正在尝试将Urban Airship集成到我的应用程序中。有些错误 发生在UAirship期间:takeOff。我写信给FAQ,但没有人回答我。

我正在使用以下代码:

NSLog(@"Starting airship...");
UAConfig *config = [UAConfig defaultConfig];
config.developmentAppKey = @"mydevelopmentkey";
config.developmentAppSecret = @"mydevelopmentsecretkey";
config.inProduction = FALSE;
[UAirship takeOff:config];
NSLog(@"Airship started");

然后,当调用takeOff方法时,应用程序崩溃,我得到了 以下输出:

hero[3457] Warning: Starting airship...
hero[3457] Warning: [W] -[UAConfig validate] [Line 163] Production App Key
is not valid.
hero[3457] Warning: [W] -[UAConfig validate] [Line 167] Production App
Secret is not valid.
hero[3457] Warning: [I] +[UAirship executeUnsafeTakeOff:] [Line 151] App
Key: <removed>
hero[3457] Warning: [I] +[UAirship executeUnsafeTakeOff:] [Line 152] App
Secret: <removed>
hero[3457] Warning: [I] +[UAirship executeUnsafeTakeOff:] [Line 153]
Server: https://device-api.urbanairship.com
hero[3457] Warning: [D] -[UAirship configureUserAgent] [Line 296] Setting
User-Agent for UA requests to hero 2.28.11.42.57 (iPod touch; iPhone OS
6.1.3; UALib 2.1.0; <removed>; ru_RU)
hero[3457] Warning: [D] void
PrintReachabilityFlags(SCNetworkReachabilityFlags, const char *) [Line 79]
Reachability Flag Status: -R -----l- networkStatusForFlags
hero[3457] Warning: [D] +[UAirship executeUnsafeTakeOff:] [Line 186]
Deleting the UA device ID
hero[3457] Error: *** Terminating app due to uncaught exception
'NSInvalidArgumentException', reason: '*** setObjectForKey: object cannot
 be nil (key: gena)'
*** First throw call stack:
(0x32d792a3 0x3aa5d97f 0x32cdb313 0x4ef85 0x4ee27 0x4f877 0x490b7 0x48aaf
0x3ae744b7 0x3ae7a3f7 0x48a8b 0x43760 0x43484 0xd95c0 0xe7020 0x336900f5
0x32d4e683 0x32d4dee9 0x32d4ccb7 0x32cbfebd 0x32cbfd49 0x368872eb
0x34bd5301 0xead4c 0x2e214)

我使用Marmalade SDK开发游戏。它提供了编写本机“扩展”(本机代码库,可以从c ++代码调用)的能力。问题是,不应该处理扩展t support all the app delegate events. For example, in Urban Airship sample code takeOff method is called from didFinishLaunchingWithOptions. But extensions are initialised later, than this message occured in appdelegate, so it can。 我尝试将上面的代码作为主线程中的方法调用。但结果是错误的。

任何人都可以帮忙吗?

1 个答案:

答案 0 :(得分:0)

错误表示您在nil中设置setObjectForkey。正确检查参数。我们也将城市飞艇添加到我们的橘子酱项目中,所以我确信这不是Urban Airship的错误。