Planned maintenance has been done but it did not solve the problem. So work will continue on this and a new time for trying updates will be announced asap.
In app purchases on iOS / Qt 5.13.0 - provisioning problem
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.
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.
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.
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:
- 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.
- Turn on the "in app purchase entitlement" in XCode
- 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.
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 ?
@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.