Mac App Store rejection: Exited with exit code: 173

I have recently received multiple rejections in recent weeks with the following notice:


We noticed that with a valid receipt installed, your app quits on launch. The Console reports the app "Exited with exit code: 173" and the OS states the app "is damaged and can't be opened." This generally indicates that the app is not verifying its receipt correctly.


Note that not all submissions are exiting in the same place even if the StoreKit and verification code remain unchanged. According to the most recent rejection notice, the app crashes after making a purchase. The notice for the prior rejection, however, states that the app always crashes on launch. Receipt verification is not performed on the initial launch.


I have been unable to replicate this issue. I have run countless simulations over the past few weeks and I have yet to receive a such an error. The app never exits at launch and all purchases are successfully verified.


I have run simulations on both debug builds and release builds that were previously rejected. The release simulations were performed on a separate volume using a guest user on a clean install. I am running the latest version of Catalina (10.15.5), although the original rejection occurred before I upgraded from 10.15.4.



A few other notes:


1. Deleing DerivedData did not work.


2. I am using verifyReceipt (https://buy.itunes.apple.com/verifyReceipt), alough it is not used on the initial launch.


3. This app contains a "Price Tier Zero" 14-day trial and an auto-renewable subscription.


4. I have submitted many builds of this app for review over last 13 months, including a few in 2020. Exit code 173 has never been a reason for rejection prior to recent weeks.


Thanks.

Do you call that exit within the app somewhere or is the system doing it?


> I am using verifyReceipt (https://buy.itunes.apple.com/verifyReceipt), alough it is not used on the initial launch.


When App Review tests an IAP they do it in the sandbox. The procedure is to first send to this website and if you get a 21007 error to test against the sandbox.

What do you want us to do about it? There is no reason to believe that the app reviewers are making it up. What are these "simulations" you keep talking about? That sounds fishy.

The system would be calling exit if the app is crashing on the initial launch. Although I do call exit 173 within the app if verification fails, no verification is performed on the initial launch. When running a test under the sandbox environment, I set breakpoints on both exit(173) and the creation of the verification class to ensure that neither is executed during the initial launch. Neither breakpoint was triggered.


> When App Review tests an IAP they do it in the sandbox. The procedure is to first send to this website and if you get a 21007 error to test against the sandbox.


My code does implement verification in this fashion. I can confirm that verification does succeed when making a purchase on my own Mac using the sandbox environment with a test user.

Apologies for my poor choice of words. I was referring to tests using the sandbox environment. Because test users are not real users and no money is exchanged, I typically think of such tests as simulations.


My reason for posting is that I have been unable to replicate the crashes, as I have had no issues when testing my app using the sandbox environment. I am trying to get to the bottom of the situation and was wondering if anyone else had experienced such a situation in the past.

Are you calling that Apple URL from your app? That's not how it is supposed to work.


Also, how are you testing the app locally? You said you were using a "both debug builds and release builds". Forget debug builds. That's for actual development in Xcode. The only way to properly test is to archive and then do an export using the "Development" option. Then test that on an entirely separate machine. New volumes and new users don't count. You can use a VM in most cases, but you should still test this on real hardware that isn't your development machine.

So there are a few confusing things here.

You can't replicate the problem so it doesn't crash in your hands - got it.

The crash is happening at App Review. Got it.


What did you do to fix the problem App Review sent about crashing at launch? Nothing?


Why are you telling us you verify at buy.itunes.apple.com? Have you ever tried to verify anything but a sandbox receipt?

Mac App Store rejection: Exited with exit code: 173
 
 
Q