{"id":34433,"date":"2021-12-14T16:21:04","date_gmt":"2021-12-14T21:21:04","guid":{"rendered":"https:\/\/mjtsai.com\/blog\/?p=34433"},"modified":"2021-12-14T16:21:56","modified_gmt":"2021-12-14T21:21:56","slug":"detecting-the-mac-testflight-environment","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2021\/12\/14\/detecting-the-mac-testflight-environment\/","title":{"rendered":"Detecting the Mac TestFlight Environment"},"content":{"rendered":"<p><a href=\"https:\/\/gist.github.com\/lukaskubanek\/cbfcab29c0c93e0e9e0a16ab09586996\">Lukas Kubanek<\/a> (<a href=\"https:\/\/twitter.com\/lukaskubanek\/status\/1470038619347947520\">tweet<\/a>):<\/p>\n<blockquote cite=\"https:\/\/gist.github.com\/lukaskubanek\/cbfcab29c0c93e0e9e0a16ab09586996\"><p>To detect the TestFlight environment on iOS, a <a href=\"https:\/\/stackoverflow.com\/questions\/26081543\/how-to-tell-at-runtime-whether-an-ios-app-is-running-through-a-testflight-beta-i\/26113597#26113597\">trick that checks the receipt file name<\/a> seems to be commonly used. Unfortunately, on macOS, the receipt file name is the same regardless of the environment, meaning that this approach can&rsquo;t be utilized. The only difference I found for the TestFlight builds on macOS is the name of the signing certificate set to <code>TestFlight Beta Distribution<\/code>. This is the above posted snippet checks for. According to my early tests on macOS, it works reliably. If you know a better way for this check, please let me know in the comments.<\/p><\/blockquote>\n\n<p>Previously:<\/p>\n<ul>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2021\/06\/08\/testflight-finally-coming-to-the-mac\/\">TestFlight Finally Coming to the Mac<\/a><\/li>\n<\/ul>","protected":false},"excerpt":{"rendered":"<p>Lukas Kubanek (tweet): To detect the TestFlight environment on iOS, a trick that checks the receipt file name seems to be commonly used. Unfortunately, on macOS, the receipt file name is the same regardless of the environment, meaning that this approach can&rsquo;t be utilized. The only difference I found for the TestFlight builds on macOS [&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-12-14T21:21:06Z","apple_news_api_id":"fd1b7464-be07-4ade-a2a2-6040761294de","apple_news_api_modified_at":"2021-12-14T21:22:00Z","apple_news_api_revision":"AAAAAAAAAAAAAAAAAAAAAA==","apple_news_api_share_url":"https:\/\/apple.news\/A_Rt0ZL4HSt6iomBAdhKU3g","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":[466,30,39,2077,74,71,901,2016],"class_list":["post-34433","post","type-post","status-publish","format-standard","hentry","category-programming-category","tag-codesigning","tag-mac","tag-macappstore","tag-macos-12","tag-opensource","tag-programming","tag-swift-programming-language","tag-testflight"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/34433","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=34433"}],"version-history":[{"count":1,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/34433\/revisions"}],"predecessor-version":[{"id":34434,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/34433\/revisions\/34434"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=34433"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=34433"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=34433"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}