For many years I created a folder for the receipt by putting a Copy Files item in the target Build Phases settings to create the _MASReceipt folder for the receipt:
wrapper:
Subpath @"Contents/MASReceipt/receipt
Now XCode doesn't seem to be creating the folder for the receipt so this could be the problem but it's impossible to know because neither XCode nor the Console logs an error. I don't see any guidance in the archived or new developer documentation about this. It could be an XCode bug.
Post
Replies
Boosts
Views
Activity
In the calling environment the code that calls getReceiptData() calls exit(173) if there is no receipt. According to the latest documentation exit(173) should tell macOS to ask for one's iTunes test user ID and password. If these are valid it should fetch a valid App Store receipt, put it in the Contents/_MASReceipt/ directory and relaunch the app.
I
tested this this morning by calling exit(173) at various places in my receipt validation code and it doesn't work. Thinking that this might be a bug like the one that will only open and display the Help Book if the app is in the Applications folder, I tried this as well. No, there is a bug in mac OS Monterey 12.0.1 that makes it impossible to use this feature to debug one's receipt validation code. This means that I can't update my app at the app store because the testers at the App Store won't be able to launch my app - they will get an alert saying that the app is damaged and to reload it from the store.
Please file a bug report. Also I filed a request for a developer support incident but I haven't gotten any help from Apple.
This ugly bug has reappeared this morning. XCode is building the application with the correct path for the receipt in the application's bundle: @"Contents/_MASReceipt/receipt" but when I execute the method receiptData = [NSData dataWithContentsOfURL: receiptURL options: NSDataReadingMappedAlways error: &theError]; I get the Damaged Application Alert, so I can't run debug with the receipt validation executing.
New
Add bookmark
#11
I created a seperate volume with macOS 11 Big Sur. It took more than 24 hours to download, install move my files over and verify everything. I got the .xip of XCode 12 from the developer site. macOS 12.1 Monterey wont run the .xip because it's not signed by a developer. I have to go to the System Preferences -> Security & Privacy control panel and tell it to open it anyway but Archive Utility posts an alert: "Unable to expand "XCode_12.5.1.xip". It is in an unsupported format. Seriously? Since when did Archive utility stop supporting this?
More bad news: To try to update my Application I restored an earlier version of XCode from my Time Machine backup disk. When I launch it it says that it's incompatible with macOS 12 Monterey and to get the latest version XCode, 13.1, from the App Store. I 'm not prepared to restore an earlier version of macOS and XCode to update my application so it looks like we will have to wait for Apple to fix this. This will probably take a LONG time, like maybe never?
Be sure to file a bug report. A bunch of other terrible problems have surfaced with Monterey. Maybe this will get fixed in the inevitable update.
Be sure to report this as a bug with Apple Bug Reporter. Yes, I noticed that the .help is a folder, not a bundle anymore.