{"id":12070,"date":"2015-08-22T09:31:31","date_gmt":"2015-08-22T13:31:31","guid":{"rendered":"http:\/\/mjtsai.com\/blog\/?p=12070"},"modified":"2015-08-26T17:09:51","modified_gmt":"2015-08-26T21:09:51","slug":"checking-for-el-capitan","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2015\/08\/22\/checking-for-el-capitan\/","title":{"rendered":"Checking for El Capitan"},"content":{"rendered":"<p><a href=\"http:\/\/lapcatsoftware.com\/articles\/checking-for-el-capitan.html\">Jeff Johnson<\/a>:<\/p>\n<blockquote cite=\"http:\/\/lapcatsoftware.com\/articles\/checking-for-el-capitan.html\">\n<p>If you&rsquo;re running on OS X 10.10.2 or later, the code tells you that you&rsquo;re running on OS X 10.11. What happened? Let&rsquo;s look at <tt>&lt;AppKit\/NSApplication.h&gt;<\/tt> from the 10.11 SDK:<\/p>\n<pre>#define NSAppKitVersionNumber10_10 1343<\/pre>\n<p>So far, so good.<\/p>\n<pre>#define NSAppKitVersionNumber10_10_2 1344\n#define NSAppKitVersionNumber10_10_3 1347\n<\/pre>\n<p>WHUT.<\/p>\n<p>So yeah, instead of increasing the fractional part of the constant for 10.10.2 and 10.10.3, they increased the integer part. Sigh.<\/p>\n<\/blockquote>\n<p>Update (2015-08-22): <a href=\"https:\/\/twitter.com\/mjtsai\/status\/635228741182971905\">My solution<\/a> is to check whether I&rsquo;m running Mac OS X 10.10.0 or later, and then use <code>-[NSProcessInfo isOperatingSystemAtLeastVersion:]<\/code>.<\/p>","protected":false},"excerpt":{"rendered":"<p>Jeff Johnson: If you&rsquo;re running on OS X 10.10.2 or later, the code tells you that you&rsquo;re running on OS X 10.11. What happened? Let&rsquo;s look at &lt;AppKit\/NSApplication.h&gt; from the 10.11 SDK: #define NSAppKitVersionNumber10_10 1343 So far, so good. #define NSAppKitVersionNumber10_10_2 1344 #define NSAppKitVersionNumber10_10_3 1347 WHUT. So yeah, instead of increasing the fractional part of [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"","apple_news_api_id":"","apple_news_api_modified_at":"","apple_news_api_revision":"","apple_news_api_share_url":"","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[4],"tags":[131,30,1199,71],"class_list":["post-12070","post","type-post","status-publish","format-standard","hentry","category-programming-category","tag-bug","tag-mac","tag-mac-os-x-10-11","tag-programming"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/12070","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=12070"}],"version-history":[{"count":3,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/12070\/revisions"}],"predecessor-version":[{"id":12084,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/12070\/revisions\/12084"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=12070"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=12070"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=12070"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}