three20运行在ios6 SDK下相关问题的解决

ios6 SDK已经更新可以下载了,但是最新的three20并不支持ios6。

我下载了最新的three20,在xcode 4.5 下面用ios6 sdk编译时会出现错误。

原因在于UIViewAdditions.m这个文件中访问的一些UITouch的属性变成私有API了,iOS6中无法访问了。

上网查找了一下,下面这个地址有人暂时做了一个ios6版本的three20.

https://github.com/ettore/three20/tree/ios6_fixes

用以下命令可以下载

git clone -b ios6_fixes git://github.com/ettore/three20.git

下载之后,发现还是有一些小问题,有些代码提示在arvm7s下没法link。

解决办法是找到相应的target,在Build Settings中,把Valid Architectures设置为armv6 armv7。

然后就可以编译通过并且可以在真机上运行了。

注意只改Valid Architectures就可以了,Architectures不需要改,否则可能无法真机运行,会提示以下错误。

XCode cannot run using the selected device. Choose a destination with a supported architecture in order to run on this device.

 

好了,做了以上设定,three20可以在ios 6 SDK运行了,不过这个是一个中间版本,不是three20的官方版本,官方版本可能还要等一段时间了。

posted on 2012-09-25 22:46  barani  阅读(1611)  评论(0编辑  收藏  举报

导航