Friday, October 18, 2024

exit(173) Receipt Fetching Deprecated on Sequoia

Jeff Johnson (Mastodon):

[If] you compile your app with the macOS 15 SDK in Xcode 16, and your app exits with the status 173—the traditional way to handle Mac App Store receipt validation failure—then macOS 15 Sequoia will show the user an alert[…]

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 main() 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.

As far as I’m aware, the new macOS 15 behavior has not been documented by Apple anywhere.

The WWDC session only says:

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’t receive any enhancements or new features in future operating system releases.

But this doesn’t mention the scary alert, and it’s not obvious that exit(173) is part of the IAP API because it was introduced for up-front purchases before IAP even existed.

Johnson has investigated the documentation history. Apple no longer mentions exit(173) at all, never saying that it was deprecated, and the current documentation recommends using StoreKit 1, which is is deprecated.

According to the WWDC session, Apple wants apps to switch to StoreKit 2, 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.

It’s not yet clear 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’s only the latter because I have not seen a huge outpouring of users mentioning the alerts. However, it’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 crash.

Previously:

Update (2024-10-21): Alexander Blach:

Mona (@MonaApp) seems to be a Mac App Store app compiled with the macOS 15 SDK (DTSDKName is “macosx15.0") that does call exit(173) on launch when the receipt is not present in its app bundle.

It does not show the deprecation alert for me and successfully refreshes the receipt.

So it looks like calling exit(173) in the production environment still works as before.

Comments RSS · Twitter · Mastodon

Leave a Comment