简体   繁体   English

Xcode 4.2上的旧版支持

[英]Legacy support on Xcode 4.2

I'm running into some problems while trying to provide legacy support to iPhone 3G and iPod Touch 2G running iOS 4.2.1. 我在尝试为运行iOS 4.2.1的iPhone 3G和iPod Touch 2G提供传统支持时遇到了一些问题。

I'm working with Snow Leopard and Xcode 4.2, SDK 5.0. 我正在使用Snow Leopard和Xcode 4.2,SDK 5.0。 Everything works fine for newer devices but it seems that older ones don't like binary built by the IDE. 对于较新的设备,一切都可以正常工作,但较旧的设备似乎不喜欢由IDE构建的二进制文件。 I mostly find strange bugs eg: 我主要发现奇怪的错误,例如:

  • using LLVM GCC compiler creates problem with touch controls 使用LLVM GCC编译器会产生触摸控件问题
  • using Apple LLVM 3.0 creates a strange problem with some code (which halts a runtime) 使用Apple LLVM 3.0时,某些代码会产生一个奇怪的问题(这会导致运行时停止)

Strangely these things disappear if I build with debug scheme, even if I tried to change every setting so that debug is as release. 奇怪的是,即使我尝试更改每个设置以使调试与发行版一样,如果我使用调试方案进行构建,这些东西也会消失。

Is there any particular trick? 有什么特别的把戏吗? Can I use base plain GCC anymore on Xcode 4.2? 我可以在Xcode 4.2上使用基本的普通GCC吗?

Also if I'm able to do GCC, how can I specify a different compiler for a different architecture? 另外,如果我能够执行GCC,如何为不同的体系结构指定不同的编译器? (I added armv6 to be able to build for old devices too) (我添加了armv6以便也可以为旧设备构建)

I managed to specify per architecture optimization settings while keeping GCC as the compiler: ARMv6 is compiled with -O0 while ARMv7 is compiled with -O2 . 我设法按体系结构优化设置进行了指定,同时将GCC保留为编译器:ARMv6使用-O0编译,而ARMv7使用-O2编译。 This fixed everything! 这样就解决了一切!

在创建项目时是否禁用了Storyboard和ARC,它应该会有所帮助!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM