-5

当我将 xcode-unity 的 mi 项目构建到 ios 时遇到问题,它崩溃了!!!,我正在寻找互联网,但我没有找到任何可以解决我的问题的方法,我尝试了所有方法。

在控制台中:

2013-01-24 11:50:05.013 pruebas[1912:907]-[AdViewController 加速度计:didAccelerate:]:无法识别的选择器发送到实例 0x1e0ac600 2013-01-24 11:50:05.015 pruebas[1912:907] * 终止应用程序due to uncaught exception 'NSInvalidArgumentException', reason: '-[AdViewController accelerometer:didAccelerate:]: unrecognized selector sent to instance 0x1e0ac600' * First throw call stack: (0x38e002a3 0x330e797f 0x38e03e07 0x38e02531 0x38d59f68 0xc8a668 0x3a730717 0x3a4c1351 0x3a4c06cd 0x3a4c011b 0x372f85a3 0x372f81d3 0x38dd5173 0x38dd5117 0x38dd3f99 0x38d46ebd 0x38d46d49 0x372f72eb 0x3a5142f9 0xfe9b8 0xf9898) libc++abi.dylib:终止调用抛出异常

当我停止项目时,异常将我重定向到以下行中的 main.mm 文件:

UIApplicationMain(argc, argv, nil, @"AppController");

我不知道发生了什么,第一次,没有这个问题,但是当升级xcode到4.5.2版本时,出现异常

我希望你能理解我并能帮助我

谢谢你!!!

4

1 回答 1

0

此方法在 iOS5 中已弃用。您必须将项目构建为面向 iOS 5 或更早版本。

http://developer.apple.com/library/ios/#documentation/uikit/reference/UIAccelerometerDelegate_Protocol/DeprecationAppendix/AppendixADeprecatedAPI.html

您必须将其替换为 Core Motion 功能才能迁移到更新版本的 iOS。

http://developer.apple.com/library/ios/#documentation/CoreMotion/Reference/CMMotionManager_Class/Reference/Reference.html#//apple_ref/doc/uid/TP40009670

于 2013-01-24T18:56:27.857 回答