{"id":45438,"date":"2024-10-18T14:29:02","date_gmt":"2024-10-18T18:29:02","guid":{"rendered":"https:\/\/mjtsai.com\/blog\/?p=45438"},"modified":"2025-03-18T11:12:29","modified_gmt":"2025-03-18T15:12:29","slug":"exit173-receipt-fetching-deprecated-on-sequoia","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2024\/10\/18\/exit173-receipt-fetching-deprecated-on-sequoia\/","title":{"rendered":"exit(173) Receipt Fetching Deprecated on Sequoia"},"content":{"rendered":"<p><a href=\"https:\/\/lapcatsoftware.com\/articles\/2024\/10\/1.html\">Jeff Johnson<\/a> (<a href=\"https:\/\/mastodon.social\/@lapcatsoftware\/113323411889879422\">Mastodon<\/a>):<\/p>\n<blockquote cite=\"https:\/\/lapcatsoftware.com\/articles\/2024\/10\/1.html\"><p>[If] you compile your app with the macOS 15 SDK in Xcode 16, and your app exits with the status 173&mdash;the traditional way to handle Mac App Store receipt validation failure&mdash;then macOS 15 Sequoia will show the user an alert[&#8230;]<\/p><p>The alert is terrible for at least two reasons. First, the text is total nonsense to end users and meaningful only to app developers. Second, the text is inaccurate. Exiting with status 173, for example returning 173 from the <code>main()<\/code> function, still works! A new, valid Mac App Store receipt will be fetched, if possible. In this respect, the only difference between Sonoma and Sequoia is that Sequoia shows the annoying, confusing, inaccurate alert to the user.<\/p><p>As far as I&rsquo;m aware, the new macOS 15 behavior has not been documented by Apple <em>anywhere<\/em>.<\/p><\/blockquote>\n<p>The <a href=\"https:\/\/developer.apple.com\/videos\/play\/wwdc2024\/10061\/\">WWDC session<\/a> <a href=\"https:\/\/www.revenuecat.com\/blog\/engineering\/storekit-1-deprecation-wwdc-2024-recap\/\">only<\/a> <a href=\"https:\/\/mastodon.social\/@lapcatsoftware\/113318064161955073\">says<\/a>:<\/p>\n<blockquote cite=\"https:\/\/developer.apple.com\/videos\/play\/wwdc2024\/10061\/\"><p>If your app still uses the Original API for In-App Purchases, I have an important update to share with you. Beginning with iOS 18 and aligned OS releases, the Original API for In-App Purchase is deprecated, including the unified receipt. Your existing apps will continue to work, but the legacy API won&rsquo;t receive any enhancements or new features in future operating system releases.<\/p><\/blockquote>\n<p>But this doesn&rsquo;t mention the scary alert, and it&rsquo;s not obvious that <code>exit(173)<\/code> is part of the IAP API because it was introduced for up-front purchases before IAP even existed.<\/p>\n<p>Johnson has investigated the documentation history. Apple no longer mentions <code>exit(173)<\/code> at all, never saying that it was deprecated, and the <a href=\"https:\/\/developer.apple.com\/documentation\/appstorereceipts\/validating_receipts_on_the_device\">current documentation<\/a> recommends using StoreKit 1, which is <a href=\"https:\/\/developer.apple.com\/documentation\/storekit\/skreceiptrefreshrequest\">is deprecated<\/a>.<\/p>\n<p>According to the WWDC session, Apple wants apps to switch to <a href=\"https:\/\/developer.apple.com\/storekit\/\">StoreKit 2<\/a>, which is a Swift-only API. Apps targeting older versions of macOS would need to bundle the entire Swift runtime just to download the Mac App Store receipt.<\/p>\n<p>It&rsquo;s <a href=\"https:\/\/social.blach.io\/@lextar\/113313225300449809\">not yet clear<\/a> to me whether Sequoia shows the alert for apps (linking with the macOS 15 SDK) downloaded from the App Store or only when testing such apps. I presume it&rsquo;s only the latter because I have not seen a huge outpouring of users mentioning the alerts. However, it&rsquo;s also possible that few apps have been shipped using Xcode 16 so far, e.g. because doing so will make apps that use Quick Look <a href=\"https:\/\/mjtsai.com\/blog\/2024\/09\/12\/xcode-16\/\">crash<\/a>.<\/p>\n\n<p>Previously:<\/p>\n<ul>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2024\/10\/04\/damaged-mac-app-store-apps\/\">&ldquo;Damaged&rdquo; Mac App Store Apps<\/a><\/li>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2024\/09\/12\/xcode-16\/\">Xcode 16<\/a><\/li>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2021\/06\/08\/storekit-2\/\">StoreKit 2<\/a><\/li>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2019\/02\/07\/swift-abi-stability-and-more\/\">Swift ABI Stability and More<\/a><\/li>\n<\/ul>\n\n<p id=\"exit173-receipt-fetching-deprecated-on-sequoia-update-2024-10-21\">Update (2024-10-21): <a href=\"https:\/\/social.blach.io\/@lextar\/113333634221743897\">Alexander Blach<\/a>:<\/p>\n<blockquote cite=\"https:\/\/social.blach.io\/@lextar\/113333634221743897\"><p>Mona (@MonaApp) seems to be a Mac App Store app compiled with the macOS 15 SDK (DTSDKName is &ldquo;macosx15.0\") that does call <code>exit(173)<\/code> on launch when the receipt is not present in its app bundle.<\/p><p>It does not show the deprecation alert for me and successfully refreshes the receipt.<\/p><p>So it looks like calling <code>exit(173)<\/code> in the production environment still works as before.<\/p><\/blockquote>\n\n<p id=\"exit173-receipt-fetching-deprecated-on-sequoia-update-2025-03-18\">Update (2025-03-18): <a href=\"https:\/\/mastodon.social\/@lapcatsoftware\/114167991149300025\">Jeff Johnson<\/a>:<\/p>\n<blockquote cite=\"https:\/\/mastodon.social\/@lapcatsoftware\/114167991149300025\"><p>I think the behavior has changed since I wrote the blog post? <code>exit(173)<\/code> no longer seems to refresh the App Store receipt [in the sandbox environment], which means that my receipt validation code is impossible to test!<\/p><\/blockquote>","protected":false},"excerpt":{"rendered":"<p>Jeff Johnson (Mastodon): [If] you compile your app with the macOS 15 SDK in Xcode 16, and your app exits with the status 173&mdash;the traditional way to handle Mac App Store receipt validation failure&mdash;then macOS 15 Sequoia will show the user an alert[&#8230;]The alert is terrible for at least two reasons. First, the text is [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"2024-10-18T18:29:05Z","apple_news_api_id":"53836580-82fe-45ad-9b26-448ad2d3b994","apple_news_api_modified_at":"2025-03-18T15:12:31Z","apple_news_api_revision":"AAAAAAAAAAAAAAAAAAAAAQ==","apple_news_api_share_url":"https:\/\/apple.news\/AU4NlgIL-Ra2bJkSK0tO5lA","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":[2392,31,2586,30,39,2598,71,901],"class_list":["post-45438","post","type-post","status-publish","format-standard","hentry","category-programming-category","tag-app-store-receipt-validation","tag-ios","tag-ios-18","tag-mac","tag-macappstore","tag-macos-15-sequoia","tag-programming","tag-swift-programming-language"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/45438","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=45438"}],"version-history":[{"count":3,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/45438\/revisions"}],"predecessor-version":[{"id":47116,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/45438\/revisions\/47116"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=45438"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=45438"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=45438"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}