Search Unity

Codeless IAP works in Testflight, but it's rejected from Apple Store

Discussion in 'Unity IAP' started by sjmonster, Apr 14, 2020.

  1. sjmonster

    sjmonster

    Joined:
    Jan 30, 2019
    Posts:
    2
    I used codeless IAP in my game and it's perfectly working in Testflight.
    But Apple Store reviewers rejected my game because it didn't work on their test device.

    This is the reason for rejection.

    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.

    As I know, I don't need any validation code to use Codeless IAP. I'm very confused.

    I think the modal view that requests ID and password to process purchase didn't show on their test device
    when they tap the IAP button. But it works in Testflight(refer to attached image).

    I spend almost 1 month to resolve it but I failed. At first, I added call back functions for several purchase
    failure cases for example time out, user cancel, network issue and so on. But it still didn't work only on Apple reviewers devices.
     

    Attached Files:

  2. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    sjmonster likes this.
  3. sjmonster

    sjmonster

    Joined:
    Jan 30, 2019
    Posts:
    2
  4. tangyinglin0228

    tangyinglin0228

    Joined:
    Apr 23, 2018
    Posts:
    16
    I was just rejected and got this message as well. But I think that it's because of my UI design or bugs. But my app uses the scripted IAP not the codeless one. I will make it more user friendly and submit again and see what will happen.

    Guideline 2.1 - Performance - App Completeness



    We found that your in-app purchase products exhibited one or more bugs when reviewed on iPad running iOS 13.4.1 on Wi-Fi.

    Tapping on In-app Purchase product has no response.

    Next Steps

    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.
     
    Last edited: Apr 19, 2020
  5. tangyinglin0228

    tangyinglin0228

    Joined:
    Apr 23, 2018
    Posts:
    16
    Just had a good news for you guys. I don't do any order validation for my App, and Apple just approved my IAP. Maybe the guys are working at home and it just took them 10 minutes to approve my IAP on SUNDAY.
    You may tell Apple the procedure you take to process an order. I just tell them that I fixed the unresponsible button problem. And my App only communicates with App Store's server during processing the order. The more details you tell App Store's staff, the less confusion they will have during approving your App.
     
    JayR and Neonlyte like this.
  6. brianmyrick

    brianmyrick

    Joined:
    Apr 11, 2020
    Posts:
    4
    I just got rejected (on a Sunday) with that message. What did you tell them? Were you using codeless IAP and got it approved?
     
    mahmoud93p likes this.
  7. mahmoud93p

    mahmoud93p

    Joined:
    Feb 11, 2015
    Posts:
    66
    I get reject 4 time and the issue is
    "We are unable to complete the review of your app because one or more of your in-app purchase products have not been submitted for review."

    More Information:
    1- I am using codeless IAP since 2018 and my game publish in 2018 with all IAP.
    2- I made test in Sandbox , TestFlight and every IAP is work - (Iphone 6s, Iphone X , Ipad Pro) in IOS version 13.5.1
    3- All IAP approved and already i have users buy my all product

    I am trying to respond "Resolution Center" and he always send to me image of sandbox - and i tell him this work and i recorded video when i buy! but not helpful !

    So i want to know the problem from where (unity IAP or Apple team review) ?
    Because my code is work and already apple sent to my payment.

    I think i need to change IAP, if there is anyone fix this problem tell me.


    JeffDUnity3D
     
  8. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Please show a screenshot of your Apple Dashboard, showing all products as available for purchase. And I don't quite follow, you've already published your app in 2018, and IAP is working? Now your new version is failing review?
     
  9. mahmoud93p

    mahmoud93p

    Joined:
    Feb 11, 2015
    Posts:
    66
    did you solve your problem ?
     
  10. mahmoud93p

    mahmoud93p

    Joined:
    Feb 11, 2015
    Posts:
    66
    Yes my game was publish in 2018 also apple sent to my many payment!
    And users can buy IAP inside my game.

    Note: I recored video when i buy from my game and i send to apple but not helpful.
    And i make test in sandbox and TestFlight and everything is work.



    Look for image.

    JeffDUnity3D
     
    Last edited: Jun 17, 2020
  11. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    It says "One unresolved issue". What did you change in your game in this update with regard to IAP?
     
  12. mahmoud93p

    mahmoud93p

    Joined:
    Feb 11, 2015
    Posts:
    66
    The Update include
    1- upgrade photon network realtime
    2- upgrade photon network Chat
    3- Fix 4 players Vs 4 players
    4- Fix legend player count
    That set there is no change anything in IAP.

    There is images from apple, but i make test in sandbox and TestFlight for all of them and is work ! did you want to see video when i buy this product?


    JeffDUnity3D
     
  13. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    You probably need to fix the "One unresolved issue". Otherwise, if there have been no changes to your IAP and no new products added or removed, etc, you would need to continue your conversation with Apple and let them know.
     
  14. mahmoud93p

    mahmoud93p

    Joined:
    Feb 11, 2015
    Posts:
    66

    Always when i send to them video he/she stop replay.
    Look i think this problem is not from unity iap, because before tow month ago i get three reject because photon network is not connection in apple team review after research i change connection type from UDP to TCP and is work in apple team review.

    So i think there is issue in apple team network or the tester is test from home with hotspot in iphone
     
  15. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Did you fix the Unresolved Issue in your screenshot? What do you see when you click on that link, please share another screenshot
     
  16. mahmoud93p

    mahmoud93p

    Joined:
    Feb 11, 2015
    Posts:
    66
    "Unresolved Issue" this related in IAP, look for image is attach.

    JeffDUnity3D
     
    JeffDUnity3D likes this.
  17. mahmoud93p

    mahmoud93p

    Joined:
    Feb 11, 2015
    Posts:
    66
    I have approved today from apple, i don't make any change in Unity IAP, Also i am use Codeless, and there is no valid receipt.

    The problem was when buy any products if you press exit button from screen "store" the purchase will succeed but you don't see any change and you need to press once again on the same purchase button after that you will see the value is changed.

    And i solve this problem like this: when you press to buy any product you can't exit from screen "store" until the result of the operation appears Failed or succeed.

    ِAlso when i upload new version i make all test and i send report file to apple, this file you will see like check box before upload binary.

    Note: my game was publish since 2018 and all players can buy, but from 2 week ago it is happen this problem.

    JeffDUnity3D
     
    Last edited: Jun 17, 2020
  18. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Glad you finally got approved! Yes, for Codeless IAP, the button has to be visible and active in the scene throughout the purchase flow.
     
  19. mahmoud93p

    mahmoud93p

    Joined:
    Feb 11, 2015
    Posts:
    66
    Today i get rejected for the same reason.

    We are unable to complete the review of your app because one or more of 
    your in-app purchase products have not been submitted for review.

    The only change inside my game in new update is Add (Arabic Falter for bad word).
    They say you not submitted in-app purchase but i make test in sandbox and everything is work and if not submit the IAP the sandbox is not work !!

    I want to say the problem maybe from apple review team in Network Setup also maybe this happen in same region from where publish your game! i am publish my game from (Middle East).
    Please anyone have same problem mention your location (Middle East , US , Europe , etc).
     
  20. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Sorry I don't follow. "The only change inside my game in new update is Add", did you add a new IAP product?
     
  21. mahmoud93p

    mahmoud93p

    Joined:
    Feb 11, 2015
    Posts:
    66
    JeffDUnity3D
    I don't add any new IAP , just i add filter for arabic chat.
    I see new update for IAP, this update for ios or just fixed issue in android ?
     
  22. AllanWalker

    AllanWalker

    Joined:
    Sep 3, 2017
    Posts:
    10
    Hi, I just got rejected by the same reason too. In fact my app got rejected by other reasons before without this problem. But after I fixed other issues and resubmit the app, they say all of my iap not working (always get transaction fail). Do I have anything missed? Anything I should do for IAP setup after being rejected?
     
  23. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
  24. AllanWalker

    AllanWalker

    Joined:
    Sep 3, 2017
    Posts:
    10
    My app is approved today. I found that when you are rejected, the IAP status will become pending developer action. You will see there is a red dot besides the Name and Description part. After you submitted a new binary, you have to go to the IAP product to change the name / desc. After that, all the IAP products will become waiting for review. Last time I just changed one of them (because I saw the status is updated for all). However, I got rejected and this time I found that although the status updated, the red dots are still there. I update the description and save one by one to make all the red dots become yellow. It works this time!!
     
    mahmoud93p and SamOYUnity3D like this.
  25. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Were your descriptions blank to begin with?
     
  26. mahmoud93p

    mahmoud93p

    Joined:
    Feb 11, 2015
    Posts:
    66
    JeffDUnity3D, i am back after six rejects :D and after 4 calls with apple, she say your binary is work fine but you messing "metadata" and i don't know where is metadata for iap !!
    , i will do like AllanWalker and i will tell you if i get approved
     
  27. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    What metadata are they referring to? Have you cleared all your warning notices on https://appstoreconnect.apple.com/apps for the game?
     
  28. AllanWalker

    AllanWalker

    Joined:
    Sep 3, 2017
    Posts:
    10
    No, my description is something like "5000 coins" at the beginning, I changed it to "5000 Coins" at last.
     
  29. mahmoud93p

    mahmoud93p

    Joined:
    Feb 11, 2015
    Posts:
    66
    JeffDUnity3D today i got approved from apple, what did i do ?
    Just i add dot for all IAP- "Display Name" & "Description" like this
    "Display Name" - Old Name = "150 jewels"
    "Description" - Old Name = "150 jewels add"
    New edit like that
    "Display Name" - Old Name = "150 jewels."
    "Description" - Old Name = "150 jewels add."

    I do that after i see comment AllanWalker, because i think the problem in appstore website metadata for iap is not submit in last update. so when you make any change in IAP name or Description must apple review team check again.

    Btw: Already i have approved and green light for all IAP inside my game since 2018.

    What metadata are they referring to? i think after call with apple the metadata is mean = "Display Name", "Description", "Product ID", "Price"....etc , for every IAP.



     
  30. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    You are asking me what you did to get approved? Sorry I would not know. But you and others seem to claim that simply making an IAP product edit triggers the positive review process.
     
  31. richardzzzarnold

    richardzzzarnold

    Joined:
    Aug 2, 2012
    Posts:
    142
  32. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    We are working on a solution which should be ready by Q2 next year.
     
  33. pagolchagol

    pagolchagol

    Joined:
    Mar 29, 2021
    Posts:
    2
    Any updates on this for iOS Codeless IAP? Not keen on going scripted at this point and also don't intend to modify unity IAP files directly with every update. If Codeless IAP doesn't handle receipt validation for iOS yet, is there any way I can handle it through any of the OnClick/OnPurchaseComplete/OnPurchaseFailed execution list instead?
     
  34. John_Corbett

    John_Corbett

    Joined:
    May 17, 2019
    Posts:
    151
    Hi @pagolchagol,

    I don't know if the CrossPlatformValidator would be enough for your receipt validation purposes, but I can show you how we use it in our QA app using Codeless IAP.

    In our scene, we have a
    GameObject
    with a
    MonoBehaviour
    that, on
    Start
    creates a CrossPlatformValidator.

    Ex:
    Code (CSharp):
    1. void Start()
    2. {
    3.     crossPlatformValidator = new CrossPlatformValidator(GooglePlayTangle.Data(), AppleTangle.Data(), Application.identifier);
    4. }
    Where this
    crossPlatformValidator
    variable as a class member to be used in a function tied to completed purchases.

    Code (CSharp):
    1. public void OnPurchaseComplete(Product product)
    2. {
    3.     var result = crossPlatformValidator.Validate(product.receipt);
    4.     ...
    5. }
    You can bind this public MonoBehaviour function to your IAP Listener in your scene:

    upload_2022-9-16_13-20-53.png

    If you wish to use a different validation method, by all means use your own as well, inspired by this post.
     
    pagolchagol likes this.
  35. pagolchagol

    pagolchagol

    Joined:
    Mar 29, 2021
    Posts:
    2
    Love this simple solution. Will definitely try it and let you know. Just a couple of questions to clarify though; the only IAP I have is a Non-Consumable "Remove Ads" Button, will this work if bound to an IAP Button also? Does this cover validation on both the production and sandbox environment of Apple?
     
  36. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Yes, But if you are modifying the code of Codeless IAP, you really should consider moving to Scripted IAP, it's much more flexible and easier to use, in my opinion.