App rejected because it does not connect to the App store

Hi,

My app was rejected by the Apple iOS store because: “- The app fails to load In-App Purchase information.”
Then they showed a screenshot with an error message shown in my store saying that the app could not connect to the store and to “please check your internet connection.” I show that message on OnInitializeFailed.

    public void OnInitializeFailed(InitializationFailureReason error)
    {
        // Purchasing set-up has not succeeded. Check error for reason. Consider sharing this reason with the user.
        Debug.Log("IAP OnInitializeFailed InitializationFailureReason:" + error);

        storeState = StoreState.NOT_CONNECTED;
        DataManager.OnStoreStatusChange();
    }

They will not share the logs, so I am not sure what the actual error is - I may re-submit with that printed to the screenshot I can see it in the screenshot they provide.

I am using Unity IAP version 3.0.2. I am using it directly from the package - I did not turn it on in services because this is a kid’s app and I don’t want analytics. I read that you could use the IAP separately without enabling services. ( Unity IAP without Analytics for kids games? page-2 ) It works in Test Flight - I have tested it extensively there.

What are the likely reasons that it is working in Test Flight but not when Apple tests it?
For what it is worth my test flight is open and can be seen here:

Thanks!

@korimako It sounds like a reviewer issue if it is working in TestFlight, you might consider an appeal or simply try again. Can you confirm that you are using receipt validation? They look for that too, and can purposely inject a fake receipt which can lead to a test failure Unity - Manual: Receipt validation

1 Like

Thanks, Jeff -

Yes, I implemented receipt validation (hopefully accurately!).
I can’t replicate the failure they see in Test Flight (how do you trigger OnInitializeFailed?) If I just turn off Wifi, it just seems to continuously try and connect.
I will show the error message to the user and see what they send back to me next time. I hate debugging via the review process - I wish they would send me the logs at least.

If you renamed all your products in your app to non-valid values, it should generate OnInitializedFailed with reason code NoProductsAvailable . Also, ensure you’ve completed all your Terms and Conditions on Apple, filled out your Business and Tax info. Again, likely not the issue as TestFlight is already working for you.

1 Like

I now suspect it may have something to do with this; in AppStoreConnect it says “An in-app purchase has been returned and is highlighted in the table below.” And “Developer Action Needed” beside each IAP. These are both purchasable in TestFlight. I just created new accounts and confirmed.


When I click into the IAPs - nothing seems actionable to me - unless the red dots beside the localizations indicate a problem?


I have resubmitted, but I am pretty sure it will fail again. Hopefully this time I can see the error message.

@korimako Yes, you’ll need to clear all those red dots. Can you click or hover over them for more info? What did you change before submitting again?

1 Like

Ahh. Thanks - I thought they might be just colored bullets - because there was no more info on hover or explanation of an error that I could see. I removed the French for now and resaved the localizations with the same text and now it says in review. Perhaps apostrophes and exclamation points are problematic there?

I resubmitted last night with a version that wrote the initialization fail error to the screen. I was:

            case InitializationFailureReason.NoProductsAvailable:
                initFailErrorMessage = "No products available.";

This seems consistent with the theory that the IAPs are not configured properly - although why they work in TestFlight is a mystery.

Likely a different locale used in TestFlight

1 Like

I think this is my problem: Subscription state "Developer acti… | Apple Developer Forums

That is an interesting thought about location.
It was rejected again today, but I think I have made some progress. I removed the exclamation mark and apostrophe from the localization IAP descriptions. Now the bullet points are yellow rather than red. If that was the problem it will be hard for me not to be really angry. :slight_smile:

Also, I forgot to answer you about taxes and contracts - they all seem fine.

Jeff - thanks for your engagement with this, it has been something of a sanity lifeline!

It was the apostrophes and/or the exclamation mark.

“Be a yardstick of quality. Some people aren’t used to an environment where excellence is expected.” - Steve Jobs.