{"id":115,"date":"2011-12-18T11:44:47","date_gmt":"2011-12-18T16:44:47","guid":{"rendered":"http:\/\/developer.casgrain.com\/?p=115"},"modified":"2011-12-20T19:49:43","modified_gmt":"2011-12-21T00:49:43","slug":"xcode-4-2-and-older-ios-devices","status":"publish","type":"post","link":"http:\/\/developer.casgrain.com\/?p=115","title":{"rendered":"Xcode 4.2 and older iOS devices"},"content":{"rendered":"<p>If you want to build software using the new default templates on Xcode 4.2, you have some work to do for older devices (anything that can&#8217;t run iOS 5).<\/p>\n<p>\nFor some unknown reason, the variable <code>$(ARCHS_STANDARD_32_BIT)<\/code>, which used to expand to <code>armv6 armv7<\/code> now expands only to <code>armv7<\/code>.<\/p>\n<p>\nFurthermore, there is a new entry in the default Info.plist which will prevent Xcode from even uploading the binary to your device.<\/p>\n<p>\nFinally, there are issues with the compiler&#8217;s <del>&#8216;thumbnail generation&#8217; code<\/del> &#8216;Thumb code&#8217; generation in Xcode 4.2. You can disable that compiler option for armv6 builds in Xcode.<\/p>\n<hr>\n<p>I have a 2nd generation iPod Touch that I use daily. It runs iOS 4.2.1, the latest it will ever run. This is essentially the same hardware as an iPhone 3G in terms of capabilities.<\/p>\n<p>\nI also have a 1st gen Touch, but it&#8217;s getting used less and less as I target iOS 4 as the earliest capable version. I&#8217;m not going to iOS 5 yet because my main device is still iOS 4.<\/p>\n<p>\nWhen I create a new project, I use iOS 5 as the SDK and iOS 4.2 as the deployment target. In theory, this allows me to target all devices that can run iOS 4, which includes my beloved Touch.<\/p>\n<p>\nTo make this work properly, you will want to do three things:<\/p>\n<ol>\n<li>In your Project&#8217;s Build Settings, locate the &#8220;Architectures&#8221; line. It should say <code>$(ARCHS_STANDARD_32_BIT)<\/code>. Edit it to contain two entries: <code>armv6<\/code> and <code>armv7<\/code>.\n<\/li>\n<p><\/p>\n<li>In your Project&#8217;s Info.plist, locate the entry for &#8220;Required device capabilities&#8221; and delete it. <br \/>If you expand it, you will see that it contains only <code>armv7<\/code>.\n<\/li>\n<p><\/p>\n<li>Bonus! Thanks to <a href=\"https:\/\/twitter.com\/#!\/jamesthomson\/status\/129344094790090753\">@jamesthomson<\/a>, there are issues with clang-llvm 3.0 on armv6 devices. <br \/>In your Project&#8217;s Build Settings, locate &#8220;Other C flags&#8221; and add &#8220;-mno-thumb&#8221; to the armv6 architecture.\n<\/ol>\n<p>\nWhen radar comes back online, I&#8217;ll file the bug (which will undoubtedly be marked &#8220;Duplicate&#8221;)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you want to build software using the new default templates on Xcode 4.2, you have some work to do for older devices (anything that can&#8217;t run iOS 5). For some unknown reason, the variable $(ARCHS_STANDARD_32_BIT), which used to expand to armv6 armv7 now expands only to armv7. Furthermore, there is a new entry in [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1,9,10],"tags":[],"class_list":["post-115","post","type-post","status-publish","format-standard","hentry","category-development","category-ios","category-xcode"],"_links":{"self":[{"href":"http:\/\/developer.casgrain.com\/index.php?rest_route=\/wp\/v2\/posts\/115","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/developer.casgrain.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/developer.casgrain.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/developer.casgrain.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/developer.casgrain.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=115"}],"version-history":[{"count":8,"href":"http:\/\/developer.casgrain.com\/index.php?rest_route=\/wp\/v2\/posts\/115\/revisions"}],"predecessor-version":[{"id":123,"href":"http:\/\/developer.casgrain.com\/index.php?rest_route=\/wp\/v2\/posts\/115\/revisions\/123"}],"wp:attachment":[{"href":"http:\/\/developer.casgrain.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=115"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/developer.casgrain.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=115"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/developer.casgrain.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=115"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}