Forum Libraries, Components, and Plugins

Plugin.InAppBilling Purchases Fail (iOS)

Hi Folks,

I have developed a XF application, though it is only being used for iOS at this point in time.

I want to add In App Purchase functionality to the app, so I am using PlugIn.InAppBilling package for this.
I believe that I have set up the products on the App Store correctly - I can use the plugin to return a list of products without any issues.
But on my test device whenever I attempt a purchase, I get a generic "Unknown Error" message returned.

Any idea why I can call GetProductInfoAsync to return the products, yet the actual purchase fails?
Is there something in the client that I need to configure?
Is there something on the server that I have missed? Something to do with the Sandbox user?
Is there somewhere on the App Store Connect that I can see why a purchase failed?

Thanks for your help.

Cheers
Jarrod

Answers

  • Hi Jarrod (and others)!

    I'm also getting the "unknown error" when trying to make a purchase. I don't even get the list of products to be retrieved from the AppStore, so how did you manage that?

    This is my first experience with in-app purchasing. The struggle started today.

    What I've done:

    • Created the app on AppStore (first version, never released, button for "Submit for Review" is enabled)
    • Have App-ID with In App Purchases enabled (enabled by default, right?)
    • Have both a Development and a Distribution certificate
    • Added two Auto-Renewable Subscriptions (values filled in so they're "Ready to Submit")
    • The product Ids first hade the format "SomethingLikeThis" - after finding some recommendation I scrapped those and created new ones following the "com.company.xxx" format - no diff
    • Created a sandbox test user - never signed in with it from Settings or anywhere else, only verified the password

    What I've tried:

    • Tried using StoreKit directly from the iOS project - only to get the product ids back in the "invalid" collection
    • Tried using PlugIn.InAppBilling - seems smooth and intuitive, but kind of the same problem - I use it from the iOS project
    • Tried with the simulator in debug and release mode (doesn't seem to be working at all since XCode 12)
    • Tried with physical device, debug and release, deployed directly from the dev machine - signed with Dev cert
    • Tried uploading a test build to AppStore and installed it on physical device through TestFlight - signed with Dist cert
    • Googling and finding a lot of questions (here, SO, Apple) but few answers

    I'm at:

    • XF 4.8.0.1687 (still)

    If there's anyone who can point in some direction I'd be really happy!

    (Sorry Jarrod if I just hi-jacked your question - hopefully we can both benefit)
    /Martin

  • blinc215blinc215 Member
    > @MartinPettersson said:
    > Hi Jarrod (and others)!
    >
    > I'm also getting the "unknown error" when trying to make a purchase. I don't even get the list of products to be retrieved from the AppStore, so how did you manage that?
    >
    > This is my first experience with in-app purchasing. The struggle started today.
    >
    > What I've done:
    >
    > * Created the app on AppStore (first version, never released, button for "Submit for Review" is enabled)
    > * Have App-ID with In App Purchases enabled (enabled by default, right?)
    > * Have both a Development and a Distribution certificate
    > * Added two Auto-Renewable Subscriptions (values filled in so they're "Ready to Submit")
    > * The product Ids first hade the format "SomethingLikeThis" - after finding some recommendation I scrapped those and created new ones following the "com.company.xxx" format - no diff
    > * Created a sandbox test user - never signed in with it from Settings or anywhere else, only verified the password
    >
    > What I've tried:
    >
    > * Tried using StoreKit directly from the iOS project - only to get the product ids back in the "invalid" collection
    > * Tried using PlugIn.InAppBilling - seems smooth and intuitive, but kind of the same problem - I use it from the iOS project
    > * Tried with the simulator in debug and release mode (doesn't seem to be working at all since XCode 12)
    > * Tried with physical device, debug and release, deployed directly from the dev machine - signed with Dev cert
    > * Tried uploading a test build to AppStore and installed it on physical device through TestFlight - signed with Dist cert
    > * Googling and finding a lot of questions (here, SO, Apple) but few answers
    >
    > I'm at:
    >
    > * XF 4.8.0.1687 (still)
    >
    > If there's anyone who can point in some direction I'd be really happy!
    >
    > (Sorry Jarrod if I just hi-jacked your question - hopefully we can both benefit)
    > /Martin
  • MartinPetterssonMartinPettersson USMember

    The errors I got was due to no signed tax form. Once that was completed, it started to work.

  • jclangejclange Member ✭✭

    @MartinPettersson said:
    The errors I got was due to no signed tax form. Once that was completed, it started to work.

    Good to hear that you got it sorted.

    My client was able to continue the testing as she was not getting the errors I was getting, so it was either device or user specific. But at some point it started working for me again. No idea what changed or why.

    Fun and games!

Sign In or Register to comment.