{"id":33651,"date":"2021-09-15T16:52:24","date_gmt":"2021-09-15T20:52:24","guid":{"rendered":"https:\/\/mjtsai.com\/blog\/?p=33651"},"modified":"2021-09-15T16:52:24","modified_gmt":"2021-09-15T20:52:24","slug":"creating-compile-time-reminders-in-xcode","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2021\/09\/15\/creating-compile-time-reminders-in-xcode\/","title":{"rendered":"Creating Compile-Time Reminders in Xcode"},"content":{"rendered":"<p><a href=\"https:\/\/recoursive.com\/2021\/09\/14\/create_compile_time_reminders\/\">Robin Kunde<\/a>:<\/p>\n<blockquote cite=\"https:\/\/recoursive.com\/2021\/09\/14\/create_compile_time_reminders\/\">\n<p>This attribute will produce a warning if the selected Swift version is available in the version of Xcode you&rsquo;re using. For 5.5 for example, this would generate a warning in Xcode 13.0 but not Xcode 12.5.<\/p>\n<p>[&#8230;]<\/p>\n<p>This attribute will produce a warning if the selected iOS (or tvOS, or macOS) version is equal to or below your <em>deployment target<\/em>. In other words [&#8230;] after you remove support for older operating systems.<\/p>\n<p>[&#8230;]<\/p>\n<p>By wrapping [a <code>#warning<\/code>] in this condtional compilation check, you can get Xcode to ignore the statement until you&rsquo;re using an Xcode version that ships with the given compiler version.<\/p>\n<\/blockquote>","protected":false},"excerpt":{"rendered":"<p>Robin Kunde: This attribute will produce a warning if the selected Swift version is available in the version of Xcode you&rsquo;re using. For 5.5 for example, this would generate a warning in Xcode 13.0 but not Xcode 12.5. [&#8230;] This attribute will produce a warning if the selected iOS (or tvOS, or macOS) version is [&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":"2021-09-15T20:52:27Z","apple_news_api_id":"90d5450a-79d8-42ad-ad52-e7f970b712f0","apple_news_api_modified_at":"2021-09-15T20:52:27Z","apple_news_api_revision":"AAAAAAAAAAD\/\/\/\/\/\/\/\/\/\/w==","apple_news_api_share_url":"https:\/\/apple.news\/AkNVFCnnYQq2tUuf5cLcS8A","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":[31,1837,30,1891,71,901,226],"class_list":["post-33651","post","type-post","status-publish","format-standard","hentry","category-programming-category","tag-ios","tag-ios-14","tag-mac","tag-macos-11-0","tag-programming","tag-swift-programming-language","tag-xcode"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/33651","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=33651"}],"version-history":[{"count":1,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/33651\/revisions"}],"predecessor-version":[{"id":33652,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/33651\/revisions\/33652"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=33651"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=33651"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=33651"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}