由于阻止了对iOS 3.1.3的支持,导致了奇怪的问题 [英] Strange issue due to block support for iOS 3.1.3

查看:102
本文介绍了由于阻止了对iOS 3.1.3的支持,导致了奇怪的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于我要定期在3.1.3设备上测试我的应用程序,因此必须添加链接器标志"-weak_library/usr/lib/libSystem.B.dylib"以支持其中的块.直到我刚开始从Apple示例中添加一些游戏中心代码后,这才成为问题.仅在模拟器中,当将块(甚至是空块)作为GC编码中的身份验证回调移交给苹果时,我随后在Apple库的深处遇到了即时崩溃(EXC_BAD_ACCESS).当我提供nil作为回调时,GC登录工作正常,该应用程序继续运行. 尽管在所有实际设备(iPad,带有iOS 4.3的iPhone,带有iOS 3.1.3的iPod上,当然也没有GC)上,它都可以正常工作.当我删除链接器的弱链接标志时,它也会在模拟器中运行而不会出现问题. 有人知道那里发生了什么吗?仅在每次要部署到旧iPod时才添加链接器标志,这不是一个令人满意的解决方案.

since I am regularly testing my app on a 3.1.3 device, I had to add a linker flag "-weak_library /usr/lib/libSystem.B.dylib" to support blocks there. This was no issue until I just started to add some gamecenter coding from the Apple samples. Only in simulator, I then faced an instant crash (EXC_BAD_ACCESS) somewhere deep in Apple's libs when a block (even an empty one) is handed over as an authentication callback in the GC coding. When I provide nil as callback, GC logon works fine and the app continues. It works fine though on all real devices (iPad, iPhone with iOS 4.3, iPod with iOS 3.1.3 -- of course w/o GC then). When I remove the weak link flag for the linker, it will also run w/o problems in simulator. Has anyone any clue what is going on there? This is not a satisfactory solution to add the linker flag only eachh time I want to deploy to my ancient iPod.

谢谢,习性

推荐答案

Apple工程师知道正确的答案:

An Apple engineer knew the right answer:

-weak_library/usr/lib/libSystem.B.dylib破坏了iOS模拟器.请改用-weak-lSystem.

-weak_library /usr/lib/libSystem.B.dylib breaks the iOS Simulator. Use -weak-lSystem instead.

这实际上有效!

这篇关于由于阻止了对iOS 3.1.3的支持,导致了奇怪的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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