{"id":4729,"date":"2014-03-30T15:00:44","date_gmt":"2014-03-30T15:00:44","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/match-xcode-compile-errors-to-deployment-target-ios-5-1-collection-of-common-programming-errors\/"},"modified":"2014-03-30T15:00:44","modified_gmt":"2014-03-30T15:00:44","slug":"match-xcode-compile-errors-to-deployment-target-ios-5-1-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/match-xcode-compile-errors-to-deployment-target-ios-5-1-collection-of-common-programming-errors\/","title":{"rendered":"Match XCode compile errors to deployment target iOS 5.1-Collection of common programming errors"},"content":{"rendered":"<p>No, it is your responsibility to check availability of classes, methods, constants and enumerations at runtime, when there is a chance that your deployment target doesn&#8217;t have them.<\/p>\n<pre><code>if ([MyClass class] == nil) { }\n\nif (![MyClass instancesRespondToSelector:@selector(foo)]) { }\n\nif (&amp;kSomeConstant == NULL) { }\n<\/code><\/pre>\n<p>Also, if a whole framework may not exist, link to it optionally (weak). Finally, test on real devices with every OS version you support.<\/p>\n<p>Old versions of Xcode are available to install side by side, but they will fail to build your project if you used any iOS 6 frameworks, classes, methods, etc.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>No, it is your responsibility to check availability of classes, methods, constants and enumerations at runtime, when there is a chance that your deployment target doesn&#8217;t have them. if ([MyClass class] == nil) { } if (![MyClass instancesRespondToSelector:@selector(foo)]) { } if (&amp;kSomeConstant == NULL) { } Also, if a whole framework may not exist, link [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-4729","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/4729","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=4729"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/4729\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=4729"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=4729"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=4729"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}