Compile in-app-purchase module



  • Hi,

    I read in some blog post that the IAP module might come with Qt 5.7. I want to test the module (https://github.com/qtproject/qtpurchasing) on iOS, Mac, and Android. How can the module included? Is there a configuration switch to include the IAP module for compilation?

    Regards,


  • Lifetime Qt Champion

    Hi,

    You should rather use the official code repository at code.qt.io. Github is only a mirror. The official repository is here

    Adding QT += purchasing to your .pro file should do the trick once you installed the module.



  • Here is what I do:

    
    git clone git://code.qt.io/qt/qt5.git
    cd qt5
    git checkout 5.6
    git pull
    perl init-repository -f
    ./configure -developer-build -opensource -nomake examples -nomake tests -confirm-license -xplatform macx-ios-clang
    

    But this does not download the purchasing module code, neither compiles it. Is there some switch?



  • Problem solved. I was in the wrong branch (dev is the correct one).



  • I am also very interested by the QtPurchase module, but i didn't get how to build it correctly.

    Choosing an Android armeabi-v7a - GCC 4.9 - Qt 5.5.1 kit and launching the build end with this error message:

    Internal Error: Unknown Android deployment JSON file location.
    Error while building/deploying project qtpurchasing (kit: Android for armeabi-v7a (GCC 4.9, Qt 5.6.0 beta))
    When executing step "Build Android APK"
    

    Do you have any hints or a link to documentation ?

    Thank you

    P.S. : i did not build from the qt5.git branch but from the single module qtpurchasing.git one


  • Lifetime Qt Champion

    @hamer you can also simply get the module and build it using the current stable release.

    @Oxyde Are you only building or are you trying to "run the application" ?



  • @SGaist Erm i guess it was just building because deploying then running would not mean a lot with a library but maybe i was confused when i tried sorry about that.
    I achieved to built qtpurchasing using the qt5 dev branch (building the whole qt sources).
    I am very glad this feature is now directly included in Open Source Qt.



  • I am trying to compile the QtPurchasing module for Android from: git://code.qt.io/qt/qtpurchasing.git.

    I don't have much experience with this, but I need some change sets that are not yet released.

    I set the android NDK and SDK paths as well as JDK. I type:

    git clone git://code.qt.io/qt/qtpurchasing.git
    qmake CONFIG+=release
    make

    This is successful and I now have an include and lib folder. Is this it?
    I do have some questions:

    1. I assume I need to cross compile for ARMv7 targets somehow?
    2. How do I tell Qt Creator (kits?) to use this module instead of the one supplied in Qt install directory?

  • Moderators

    @Phataas
    I think you're missing "make install" after make.

    1. Yes, you need to compile for Android using the compiler from NDK
    2. Yes, configure a Kit with Android Qt version and NDK compiler

  • Lifetime Qt Champion

    In addtion to @jsulm make install suggestion:

    You should use the qmake from your Android Qt build.

    Don't select the release or debug build. You'll likely going to run your application in both modes thus you won't be able to build it if you only have one of the two qtpurchasing builds.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.