呼叫起飞时,Urban Airship坠毁 [英] Urban Airship crashes when calling takeoff

查看:145
本文介绍了呼叫起飞时,Urban Airship坠毁的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用Xcode 5.0升级到UrbanAirship 3.0.0,我在调用此代码时遇到错误:

Upgrading to UrbanAirship 3.0.0 with Xcode 5.0, I'm getting an error when calling this code:

[UAirship takeOff:config];

错误是

+[NSJSONSerialization stringWithObject:]: unrecognized selector sent to class 0x3b2ca9fc
2013-09-19 15:02:31.981 [178:60b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[NSJSONSerialization stringWithObject:]: unrecognized selector sent to class 0x3b2ca9fc'

这不是'在 AirshipConfig.plist 中将inProduction键设置为YES时似乎出现了这一点,这在调用takeOff时是有意义的:填充UAirShip的实例。
这似乎是由于类别 NSJSONSerialization + UAAdditions

This doesn't seem to appear when setting the key "inProduction" to "YES" in the AirshipConfig.plist, which makes sense as calling takeOff: populates the instance of UAirShip. It seems to be due to the category NSJSONSerialization+UAAdditions.

对此有何帮助?
谢谢

Any help on this one? Thanks

推荐答案

要修复此问题,必须在Other Linker Flags中包含-ObjC标志在您的项目中构建设置。

To fix this issue, you must include "-ObjC" flag in "Other Linker Flags" found in your projects build settings.

UAirship库3.x现在使用Objective-C类别,因此必须设置此标志以避免运行时异常。

UAirship library 3.x now makes use of Objective-C categories so this flag must be set to avoid the runtime exception.

有关此问题的详细信息,请访问:

Details on the issue can be found here:

https://developer.apple.com/library/mac/qa/qa1490/_index.html

更新了文档:

http://docs.urbanairship.com/build/ios.html#build-settings
http://docs.urbanairship.com/topic_guides/ios_migration.html#linker-flags

这篇关于呼叫起飞时,Urban Airship坠毁的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆