{"id":2473,"date":"2022-08-30T15:25:09","date_gmt":"2022-08-30T15:25:09","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/01\/17\/is-it-possible-to-detect-that-your-ios-app-is-running-on-an-ipad-mini-at-runtime-collection-of-common-programming-errors\/"},"modified":"2022-08-30T15:25:09","modified_gmt":"2022-08-30T15:25:09","slug":"is-it-possible-to-detect-that-your-ios-app-is-running-on-an-ipad-mini-at-runtime-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/is-it-possible-to-detect-that-your-ios-app-is-running-on-an-ipad-mini-at-runtime-collection-of-common-programming-errors\/","title":{"rendered":"Is it possible to detect that your iOS app is running on an iPad mini at runtime?-Collection of common programming errors"},"content":{"rendered":"<p>There is no reliable, future-proof way to detect the iPad mini&#8217;s pixel density. Other answers suggest looking at the <code>hw.machine<\/code> string. But we don&#8217;t know (as of the time I write this) what the strings will be for the iPad mini cellular models (though we can make an educated guess: <code>iPad2,6<\/code> will probably have GSM and <code>iPad2,7<\/code> will probably have CDMA).<\/p>\n<p>It&#8217;s fine to look at the <code>hw.machine<\/code> string for analytics. But it&#8217;s dangerous to let it affect your app&#8217;s user interface, because even the <code>iPad2,5<\/code> string for the current iPad mini is subject to change.<\/p>\n<p>When the iPad 2 came out, the wifi model&#8217;s string was <code>iPad2,1<\/code>. Later (when they released the iPad 3), they changed the iPad 2 hardware and changed the <code>hw.machine<\/code> string to <code>iPad2,4<\/code>, but they still called it the iPad 2. The same thing could happen with the iPad mini &#8211; or even with the iPad 2 again! For example, Apple could release yet another version of the iPad 2 hardware and give it the machine string <code>iPad2,8<\/code>.<\/p>\n<p id=\"rop\"><small>Originally posted 2014-01-17 07:09:56. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>There is no reliable, future-proof way to detect the iPad mini&#8217;s pixel density. Other answers suggest looking at the hw.machine string. But we don&#8217;t know (as of the time I write this) what the strings will be for the iPad mini cellular models (though we can make an educated guess: iPad2,6 will probably have GSM [&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-2473","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/2473","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=2473"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/2473\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=2473"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=2473"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=2473"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}