Coding In-app Purchase?

Discussion in 'In App Purchases' started by I_Dint_Get_It, Mar 14, 2018.

  1. I_Dint_Get_It

    I_Dint_Get_It Boxer

    Joined:
    Mar 13, 2018
    Messages:
    3
    Likes Received:
    1
    Hello All,

    So, for days I have been trying to get my IAP's working through my game and nothing is working. Been wondering if it is a coding issue or does Buildbox have this already in their software? I have added the Store ID under the IAP in the game. I have made sure that the IAP in Xcode is ON. Nothing is working. Keep getting the "Cannot connect to iTunes Store". Do we have to input the StoreKit coding in order for this to work? If so, Where do I learn this? Youtube sucks as I have watched over 20 videos about adding in StoreKit and all have failed. SkPayment coding is not working when I tried it through YouTube. ANY hep would be much appreciated as I am ready to throw my Mac out the window!....lol. Thank You in advance.
     
  2. Andy

    Andy Miniboss Boxer

    Joined:
    Sep 24, 2015
    Messages:
    2,152
    Likes Received:
    1,540
    On the Buildbox side, you only need to add the Store ID to the Buildbox software. No coding is required at all. The only additional step is to configure iTunesConnect for the IAP.

    Are you testing on a real device? You have to test on a real device.
     
  3. spicedbeangames

    spicedbeangames Serious Boxer

    Joined:
    Mar 31, 2016
    Messages:
    971
    Likes Received:
    402
    Are your IAPs actually live and approved by Apple? You must wait for these to be approved first, otherwise they will not work.
     
  4. I_Dint_Get_It

    I_Dint_Get_It Boxer

    Joined:
    Mar 13, 2018
    Messages:
    3
    Likes Received:
    1
    @Andy Yes, I have been testing on a real device before I submit them.
    @spicedbeangames So, before I can submit the build they must be live first? Thank you, I will try this as I did not do this before. I just submitted the build and put the StoreID's inside the Buildbox game.....lol. "I didn't get it"
     
    OneHitGamer likes this.
  5. I_Dint_Get_It

    I_Dint_Get_It Boxer

    Joined:
    Mar 13, 2018
    Messages:
    3
    Likes Received:
    1
    So, since I wrote this, I have been having issues still. I keep getting denied from the IAP department. "developer action needed". I have submitted the IAP's with screenshots, checked that the ID's match multiple times, Check the "Buy and Use" box in Buildbox, turned on the capabilities in Xcode, and submitted the binary multiple times. Really getting upset about it, because I know that I have to be missing something Please Help!
     
  6. saritha

    saritha Boxer

    Joined:
    Nov 23, 2016
    Messages:
    37
    Likes Received:
    3
  7. AaroArts

    AaroArts Miniboss Boxer

    Joined:
    Jun 22, 2016
    Messages:
    1,426
    Likes Received:
    729
    This is done automatically when a purchase button is pressed if it's set up correctly.

    Things you could check:
    You're using a "Purchase Button" in Buildbox.
    Your Purchase Button has the correct In-App Purchase ID, as displayed in iTunes/AppStore Connect.
    You have enabled In-App Purchases "capabilities" in Xcode.
    You have added your In-App Purchase to your Build page in iTunes/AppStore Connect.
     
  8. saritha

    saritha Boxer

    Joined:
    Nov 23, 2016
    Messages:
    37
    Likes Received:
    3


    Thanks, @AaroArts. I Followed the steps what u mentioned in the previous thread. But, once I tapped the button it straight away asked the iTunes login without the confirmation alert (shown in the link). That's the reason they mentioned in the mail.
     
  9. AaroArts

    AaroArts Miniboss Boxer

    Joined:
    Jun 22, 2016
    Messages:
    1,426
    Likes Received:
    729
    Can you upload a video?
    Does this happen on the simulator or device?
     
  10. saritha

    saritha Boxer

    Joined:
    Nov 23, 2016
    Messages:
    37
    Likes Received:
    3
    I have uploaded this video. Please check that in below.
    Its happened on both simulator and device.



    When I click the No ads button, I suddenly go to sign in to iTunes connect login page. I want to add a confirmation alert.
     
  11. saritha

    saritha Boxer

    Joined:
    Nov 23, 2016
    Messages:
    37
    Likes Received:
    3
    Like this.
     

    Attached Files:

  12. Andy

    Andy Miniboss Boxer

    Joined:
    Sep 24, 2015
    Messages:
    2,152
    Likes Received:
    1,540
    1) You have to be logged in to use IAP, so if you are not logged in it will ask you to do it.
    2) If you are trying to test IAP on the Xcode simulator, well, you can't, Apple does not allow this. (You could many years ago, but not anymore). So you NEED a real device to test them.
    3) Also if you are testing, you need to use a test account. Check the IAP docs from Apple on how to properly test.
     
  13. DMartensson

    DMartensson Boxer

    Joined:
    Jan 13, 2019
    Messages:
    11
    Likes Received:
    1
    Any update of fix here? I’m having same type of issues and was just rejected.
     
  14. AaroArts

    AaroArts Miniboss Boxer

    Joined:
    Jun 22, 2016
    Messages:
    1,426
    Likes Received:
    729
    Apple doesn't allow sandbox IAP to test them before the App is live anymore.
    So as long as you've implemented it correctly in Buildbox, used the correct App ID's and uploaded the correct metadata in iTunes Connect, they will work once the App is live.
    Also, be sure to include a Restore button to restore non-consumable IAP.
     
    spicedbeangames likes this.
  15. DMartensson

    DMartensson Boxer

    Joined:
    Jan 13, 2019
    Messages:
    11
    Likes Received:
    1
  16. AaroArts

    AaroArts Miniboss Boxer

    Joined:
    Jun 22, 2016
    Messages:
    1,426
    Likes Received:
    729
    I was under the impression Apple removed the ability to create Sandbox Users in iTunesConnect about 2 years ago.
    Looking at that link, it looks like you can now create a Test Account somehow.

    With that said, if everything is correct in Buildbox, everything should work fine.
    Why are Apple rejecting your IAP? Are you getting any errors in Xcode?
    Have you asked the Reviewer for more information regarding the rejection?
     
  17. DMartensson

    DMartensson Boxer

    Joined:
    Jan 13, 2019
    Messages:
    11
    Likes Received:
    1
    Both him and me get same error, a box stating "Transaction Error", see below.
    I think all is done correct, checked the ID's etc. Will do a new build with new ID's and see if its better luck.
     

    Attached Files:

  18. DMartensson

    DMartensson Boxer

    Joined:
    Jan 13, 2019
    Messages:
    11
    Likes Received:
    1
    After rebuilding the IAP ID and units in both app and Connect it now works. Strange... Can also recommend to do testing in Teatflight app as you can simply do IAP and see all ads without paying a single cent even though using your own Apple ID. No need for Sandbox stuff.
     
  19. AaroArts

    AaroArts Miniboss Boxer

    Joined:
    Jun 22, 2016
    Messages:
    1,426
    Likes Received:
    729
    Excellent.
    Cool, that’s handy to know about the TestFlight App.
    I’m glad you got it sorted.
     

Share This Page