Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Call for Presentations - Qt World Summit

    Solved In app purchases on iOS / Qt 5.13.0 - provisioning problem

    Mobile and Embedded
    2
    6
    272
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Supernauris
      Supernauris last edited by

      I am trying to set up in-app purchases on iOS and test it on a device, using Qt 5.13.0, following the instructions in https://doc.qt.io/qt-5/qtpurchasing-appstore.html#

      As the application starts I call QInAppStore::registerProduct two times (= once per product). As I see it, the phone should then ask me to log into the app store, so that the registerProduct calls can finish. The app store interface does not come up. Instead, after 20-25 seconds the QInAppStore emits productUnknown, for both of the products.

      My suspicion is that there is something wrong with my provisioning setup. I am using QtCreator, with Automatic signing checked in the project iOS preferences. I have also tried to use the provisioning profile I created for the purpose (instead of automatic signing), but this causes the build to fail with:

      Check dependencies
      Code Signing Error: Provisioning profile "[REDACTED]" doesn't include signing certificate "iPhone Developer: [REDACTED]".
      Code Signing Error: Code signing is required for product type 'Application' in SDK 'iOS 12.4'
      Code Signing Error: Code signing is required for product type 'Application' in SDK 'iOS 12.4'
      

      Any ideas on how to move forward?

      PS. Originally the productUnknown signal was emitted in about 3 seconds, but then I adjusted the apple bundle ids and product ids.

      1 Reply Last reply Reply Quote 0
      • Supernauris
        Supernauris last edited by

        I guess this could also be related to having something wrong in the shop/app/product setup. Does anybody know about a way to get more debug information about the issue?

        There are about 30 things that could go wrong, getting a single productUnknown signal does not give direction about where the problem could be.

        1 Reply Last reply Reply Quote 0
        • SGaist
          SGaist Lifetime Qt Champion last edited by

          Hi and welcome to devnet,

          The QtPurchase module being pretty new, you will likely get more in depth answers by bringing your question on the interest mailing list. You'll find there QtPurchase's developers/maintainers.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply Reply Quote 0
          • Supernauris
            Supernauris last edited by

            I watched this video https://www.youtube.com/watch?v=YHGIij_stpk and found a few more things, which are not mentioned in link above. After taking those into account my app gets the productRegistered signal from QInAppStore.

            Here are some notes of the extra steps I took:

            1. Fill in all the tax, agreement etc. forms in the App store connect. This also changed some of the forms in my App store "new feature" dialogs.
            2. Turn on the "in app purchase entitlement" in XCode
            3. Updated the product ids to start with the exact application bundle id. If the bundle id is "com.abcde.MyApp", then the product ids have to be "com.abcde.MyApp.buy1" etc. Using "com.abcde.myapp.buy1" fails.

            I am not 100% certain if all of these are mandatory, since things started to work only after doing the last step.

            1 Reply Last reply Reply Quote 3
            • SGaist
              SGaist Lifetime Qt Champion last edited by

              Glad you found out and thanks for sharing !

              Would you consider contributing an update to the documentation so it'll help other users of the module ?

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              Supernauris 1 Reply Last reply Reply Quote 0
              • Supernauris
                Supernauris @SGaist last edited by

                @sgaist Maybe at some point. Also, note that I am not 100% sure of what the exact instructions should be - some parts are certainly necessary, while it others might not be.

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post