In App Purchase Non-Consumable - Performance - App Completeness iOS 14.2 - swift

Issue I am facing is this below:
"We found that your in-app purchase products exhibited one or more bugs when reviewed on iPhone running iOS 14.2 on Wi-Fi."
"When validating receipts on your server, your server needs to be able to handle a production-signed app getting its receipts from Apple’s test environment. The recommended approach is for your production server to always validate receipts against the production App Store first. If validation fails with the error code "Sandbox receipt used in production," you should validate against the test environment instead."
I have implemented in-App Purchase (Non-Consumable), Its working perfectly fine in Buy and Restore etc. Apple Rejects with the above reason.
What I am doing:
Using SwiftyStoreKit
Click Buy Button
SwiftyStoreKit.retrieveProductsInfo
SwiftyStoreKit.purchaseProduct
On Success ( SwiftyStoreKit.finishTransaction )
Restore:
Click Restore
SwiftyStoreKit.restorePurchases
Please let me know if need more information or code etc and what I am doing wrong which rejected the app.
Apple Recently Replied me as well this below message:
"Regarding purchasing in-app purchases, we continue to be unable to buy the full version of the app. When we tap on the button to buy, the app continues to load indefinitely.
We are not able to provide feedback on app concepts or features, but we recommend evaluating your suggestions against the App Store Review Guidelines, as well as the iOS Developer Program License Agreement (PLA), and the iOS Human Interface Guidelines."

So I found the Solution for this. When ever you receive error something like above, here are the steps you need to check and do.
Check first your In-App Purchase Implementation. Are you doing it correctly, ending the transaction etc.
Check what is the latest version of iOS supported by your XCode. If its lower than the shown in the issue like in mine ( xcode ios version was 14.0 and issue with 14.2).
For that you need to just download the latest XCode which support that iOS Version and make a build and then submit for review. It will surely work.

Related

MZCommerceInAppBuy.App BuyInfoDataAccessFailure_message

So I'm testing out an in-app purchase in my app. I've got the code set up properly and everything, but when I do attempt to buy or restore in the sandbox environment, I get this error:
MZCommerceInAppBuy.App BuyInfoDataAccessFailure_message
[Environment: Sandbox]
I've never seen this before, and I am finding only one Google search result from someone else who has. It never was solved. Has anybody seen this?
I figured out a solution. The problem was coming because I was adding an in-app purchase to the current live version of my app. I created a new version of my app and changed it on my target to the update version.
I also downloaded a new development provisioning profile. I'm not sure if this is necessary, but I wanted to add that I created a new one just in case.
When you add in-app purchases to an app, you must create a new app version even for testing.
Note:
Just a side note. I noticed while I received this error I also wan't receiving any in-app purchase products. You will not receive any products until you create the new version.

Testing next app version's IAP content?

Does Apple currently allow one to test obtaining new IAP content through StoreKit if that IAP is meant for the next unreleased version of the app?
From what I can tell, iTunes Connect explicitly warns you that new IAP items that are meant for future versions of the app will be always rejected, and that you need to submit those for review in parallel to submitting the next app version.
Is there perhaps a way to have those non-reviewed items be visible to StoreKit in the sandbox environment?
To answer my own question, you are in fact able to see not-yet-reviewed IAPs from StoreKit, meaning that you can test those items as soon as they're declared in iTunes Connect.

In-App Purchase Products not showing in iOS 5.1

If I use 4.2 iOS device such as 2nd gen iPod touch, products show up.
if I use 5.1 iOS device such as iPhone 4s, no product(s) shows up.
Anybody having same issue? I'm testing this in the sandbox environment.
Thanks in advance for any help!
The in-app purchase sandbox is so temperamental. If your code is working on 4.2 and not on 5.1 then the problem is probably one of your environment - there is a long list of things that can go wrong.
This guide was the best help I found on the net around in app purchases and highlights the problems with the API and testing:
http://troybrant.net/blog/2010/01/in-app-purchases-a-full-walkthrough/
The #1 problems I had were:
Not signing into the right iTunes sandbox account on the testing device. Always check.
Deleting the app off the device, clean build, reinstall. This was very important.
Check your in-app purchase codes are right.
Interpreting a failure as something wrong with my app. Sometimes a failure meant that the sandbox wasn't responding (cannot connect to itunes store). I would run the same code the next day and it would work. The sandbox doesn't give enough error information for you to know if the sandbox failed or your app code or some mismatch with in-app code data. Put as much debugging log statements in your code to check the response from the server and whether product codes are returned on initialization.
Good luck - it is a very irritating developer experience

Apple Rejection of application due to in app purchase

I had created one application with 2 versions one is paid second free.
Now in free application my some of features are showing an alert by telling the user
"For using this feature you have to purchase Full Version. Do want to purchase?"
On click of No nothing done just dismiss the alert and user can continue with other available features.
On click of Yes I am navigating user on my application's link in app store. My application enter in background and AppStore opens. That shows my application. From there user can purchase app and can download app.
Apple rejected my free version application with following reason:
11.13 Apps that link to external mechanisms for purchases or subscriptions to be used in the app, such as a “buy" button that goes to a web site to purchase a digital book, will be rejected.
1) Am I doing is wrong?
2) Can I use in app purchase in the manner that my free version application get removed and full version get available? because logic for both application is different.
Thanks,
You can't disable features in lite versions. For example, if your lite version has a button that says "Level 5", the user clicks it, and it tells them to buy the full version, the app will be rejected. However, if you have a button that says "Get the full version for more levels," that should be acceptable.
The only way to be sure is to ask Apple.
I would interpret what you've said as:
Going to the App Store to purchase the full version of your app is acceptible. Many apps (including mine) do just that.
However, using IAP to perform the upgrade might be preferable. Your main problem is transitioning existing users from the Lite/Full apps to one with IAP -- in short there's no fool-proof way of doing it.
One thing that might get you rejected is non-functional buttons in the free app. According to the guide-lines, all apps need to be fully functional. Of course your free version can have fewer features, but they don't like it when there are buttons that do nothing but prompt you to upgrade.
What you are doing here is not in-app purchase. In-app purchase refers to using the iOS SDK to allow a user to purchase additional content or functionality that will run in your app. Having 2 separate versions of the app like that does not use in-app purchase.
I'm guessing your app was rejected because you gave the appearance of in-app purchasing by having a message saying "For using this feature you have to purchase Full Version. Do want to purchase?" What you should be able to do, without significant change, is disable those buttons that aren't available in the free version; perhaps replace their text with "Full Version Only." Then, somewhere else in the app, maybe the home screen or screen where those buttons are, you can have a button that says "Get the full version!" or something, which would link to your full version in the store.

Need to upload binary to test in-app purchase?

Opinion seems to be split on whether an app binary is required to be uploaded to iTunes Connect before a testing an in-app purchase. I've created the app (no binary uploaded yet), created the in-app purchase, enabled by App ID for in-app purchase and marked the purchase "available for sale". I've followed the instructions in the guide as far as I can tell.
However, when I try it on my device I am unable to retrieve the products - SKProductRequest returns my request product as invalid.
Any suggestions what I need to do?
Does the in-app purchase product need to "Developer Approved" for this to work?
Any definitive answer on whether a binary needs to be uploaded? I would like to avoid that if possible but am willing to do it if required.
Well, actually I just had a similar issue that was solved only AFTER uploading a binary and rejecting it, so I am not sure that the answer above is correct. Would love to hear something from Apple about it as it is the second time this happens to me.
Binary does not need to be uploaded. Source: my current in-development app.
I am getting my test in-app purchases without uploading my binary, and without setting the purchase to be developer approved. I followed the instruction included in the docs to set it up.
Have you been testing on the device? in-app purchases do not work in the simulator. Perhaps if you posted some more info we could help a little bit better.
This is my method... I usually get caught because I miss step 3:
Step 1
Create your IAP's
(I won't go throught that in detail... unless someone wants me too.)
Step 2
Edit In-App Purchases
Select In-App Purchases for review with this app version. The In-App Purchases shown will be ones in the Ready to Submit state.
Step 3
Re-generate your dev & dist certificates in apple developer.
Site 4
Install the certificates from step 3. and ensure under Xcode's Code Signing you do this:
- Set both debug & release setting to Don't Code Sign
- Then assign with your new certificates.
Step 5
Clean and rebuild in Xcode and your IAP's should sandbox on your test devices.
Good luck!
This question is just a bit dated, but working through the Ray Wenderlich IAP tutorial (found HERE) confirms how one goes about testing IAP without uploading a binary.