My app is continually rejected because in app purchases aren't working

My in-app purchases work in TestFlight without problem, and my testers report the same. What seems to be the problem is that when Apple is testing, when the app requests the SKProducts from Apple, they are either not being returned at all, or an empty set of SKProducts is being returned. At the moment, all of my in-app purchases are listed as "waiting for review". Do I need to wait for my in-app purchases to be returned before I submit my app again - as in, is it possible that when Apple tests, my app is failing because only approved in-app purchases are being returned (in this case, none, because this is a new app)?

Accepted Reply

Thanks - and if anyone else is having the same issue, I believe I have found the root problem, and it is on Apple’s end: https://twitter.com/jpeguin/status/1174217758604705792?s=21

Replies

> At the moment, all of my in-app purchases are listed as "waiting for review".


Your app got rejected because of a problem with IAPs. At that point the IAPs should have been marked 'developer action required'. Was it? If not, that's weird. Here are the directions:


https://help.apple.com/app-store-connect/#/dev1986a0e5c


Normally you attach the IAP to the binary and submit it. Only then does it get marked 'waiting for review'. IAPs (the first time) will not get reviewed unless they are being reviewed as part of a new binary submission.

Yeah, the first time I submitted the app this was the case. Once the app was rejected, the in-app purchases were listed as waiting for review again. I went into one of the in-app purchases, edited the description, and all of the in-app purchases changed to "waiting for review".


At this point, should I be waiting for those in-app purchases to be approved before submitting a binary again? I can't find anything in my testing that leads me to believe any of the IAP problems are in my app.

Let me parse what you wrote:

> Yeah, the first time I submitted the app this [what is 'this'? can we assume you mean they were marked 'waiting for review' when you submitted them?] was the case. Once the app was rejected, the in-app purchases were listed as waiting for review again [did you mean 'developer action required'???] . I went into one of the in-app purchases, edited the description, and all of the in-app purchases changed to "waiting for review" [so, if they changed to 'waiting for review' then they were not 'waiting for review' before - correct?].


I assume everything is as it should be up to this point. You meant to write they were submitted as 'waiting for review' and then the app got rejected for some reason and the IAPs came back marked 'developer action required'. Then you changed them and they got changed to 'waiting for review'. All good.


But they got rejected! You need to address that problem before resubmitting. Was the problem with the IAPs or the binary - have you fixed that? Or, are you assuming that App Review simply made a mistake? What did App REview say when they rejected the app?


>At this point, should I be waiting for those in-app purchases to be approved before submitting a binary again? I can't find anything in my testing that leads me to believe any of the IAP problems are in my app.


Can we assume that this is the first IAP for this app? If so, then you will need to have a binary reviewed with those IAPs - you can't get a first IAP approved without a new binary. How is your most recent binary marked - the one that just got rejected?

Sorry, let me be more clear and try to answer all your new questions.


This is a brand new app, that contains six in-app purchases (three consumables, three non-consumables). The first time I submitted the app, I was given the option to select in-app purchases, and selected all six available IAP. I was rejected, and fixed an issue where a poor internet connection could cause an issue with loading IAP.


From that point, the next three times I submitted the app for review, I was not given the option to select IAP to include with submitting the app. I did not check the status of the IAP separately - which is clearly something I should have done. I've submitted dozens of apps over the past 7 years, but this is my first with IAP, so my prior mental workflows took over on this one.


Each of those next three times, my app was rejected because the in-app purchases could not be purchased. The problem area of the code seems to be this line:

iflet product = IAPProducts.store.levelPackProducts.first(where: { $0.productIdentifier == levelPack.productIdentifier ?? "" }),
     let regularPrice = product.regularPrice {
     ...
} else {
     selectedLockedPack = levelPack                    
     loadingAlert = displayLoadingIAPAlert()
     IAPProducts.store.loadIAP()
}

That levelPackProducts is filled when the following occurs (which should happen both at app startup and when the network state changes, as well as if there is no IAP match:

public func loadIAP() {
        isLoadingIAP = true
        requestProducts { [weak self] success, products in
            guard let self = self else {
                return
            }
            if success, let products = products {
                print("finished loading products")
                self.iapLoaded = true
                self.tipProducts = products.filter({ IAPProducts.tipProductIdentifiers.contains($0.productIdentifier) }).sorted(by: { $0.price.floatValue < $1.price.floatValue })
                self.levelPackProducts = products.filter({ IAPProducts.packProductIdentifiers.contains($0.productIdentifier) }).sorted(by: { $0.price.floatValue < $1.price.floatValue })
                self.isLoadingIAP = false
                NotificationCenter.default.post(name: Notifications.productsLoaded, object: nil)
            }
        }
    }

Note - all of this code works as expected in TestFlight. I can only make an issue happen if I use the Network Link Conditioner and set it to 100% packet loss (even setting it to a really bad connection works). Every rejection has had to do with a matching IAP not being found when a user tries to initiate a purchase (line 1 of the top code sample). Currently the loading IAP alert (line 6 of the top code sample) just stays on the screen spinning, and as far as I can tell it is because the second code sample keeps returning an empty array.


At this point, I am able to "re-submit" the latest binary of the app, App Store connect has no issue with me doing that (I've re-selected that build but have not clicked the "Submit for Review" button). I could also submit a new binary, but it would be the exact same code at this point. I am again not given the option to select IAP to review with my binary when submitting the binary for review - instead, this time, I edited one of the IAP English descriptions, and all of those IAP are marked as "Waiting for Review" - which, as far as I know, this is the first time it as said that.


At this point, should I resubmit (or push a new binary and submit) my app? Or should I be waiting on the IAP to be approved before I submit my app? I really feel based on all my testing, and the incremental changes I have made to my app after each rejection, that the issue is the IAP not being approved before the app is tested - so nothing is being returned when my app is tested. Is that a valid possibility? I'm more than open to needing to look more at my code - but I'm honestly not sure what to even try next, as everything works perfectly in TestFlight (fresh install, several different devices, every time).

TMI. But is it possible that, after your ‘flawed’ submission #1, all future submissions had your IAPs marked ‘needs developer action’? If so, now that you have corrected that problem and the original problem in submission #1, you are good-to-go. Resubmit that binary.

Yes, it's entirely possible that my IAPs were marked "needs developer action" previously, as I didn't check on them. I know 100% right now they are listed as "Waiting for Review", so I'm going to submit the binary now. Thank you.

Good luck!

Thanks - and if anyone else is having the same issue, I believe I have found the root problem, and it is on Apple’s end: https://twitter.com/jpeguin/status/1174217758604705792?s=21

Any update on this?

My app has been rejected today by the same reason.

Any updates on this?

Any update on this or the DTS that was opened? I just got rejected 4x for this. I too just opened a DTS ticket.

Since the OP marked this as "answered", I would raise concern on an open thread.

I have run into this too. I submitted a tvOS app with 8 IAPs (Renewable). The app was rejected for a EULA issue which we fix and resubmitted the same binary. It was rejected again because the IAPs did not load and the price buttons did not populate. I then made a new build and submitted but because the 8 IAPs are all 'Waiting For Review", there is no way to attach them to the latest build.

So frustrating.