How to add Target in Qt IOS project file eg. share extension ?

  • Hi,
    i just want to add share extension for IOS in qt project. i can easy add extension through xcode but unable to do it through Qt Project file. is there any way to add extension directly in qt project file.

  • Lifetime Qt Champion

    Hi and welcome to devnet,

    What do you mean by share extension ?

  • @SGaist we are trying to build mobile app on IOS using QT. After running qmake the "project.pbxproj" file is getting created then we are using xcode to edit the project file ant adding share extensions using "File > target > share extension" then we use "make" this process can we do it automatically using command line or shell script. basically we want to automate the build process.

  • Lifetime Qt Champion

    If I understood things correctly, adding these extension is essentially updating the Info.plist file with additional keys and corresponding values.

    One thing you can do is to copy the final Info.plist generated with Xcode in your project and use that one for your application rather than the one automatically generated. See here for more details.

  • Hi!

    You might want to try V-Play Engine, which makes Qt mobile development easier e.g. with built-in components like NativeUtils::share to trigger a native share dialog on iOS or Android devices from within QML.
    The engine also automatically links required frameworks and supports modifying the used Info-Plist in Qt-Creator.

    import VPlayApps 1.0
    App {
      id: app
      AppButton {
        text: "Share Website"
        onClicked: nativeUtils.share("This is shared using the native device share dialog.", "")


  • Hi, did anybody find a solution for this? I'm having the same problem with iOS Today Widgets (that's the stuff you get when you swipe down from the top of your iOS screen). Basically it works, but with every run of qmake you need to manually open XCode, "File > Target > Today Widget" and add the source files again. This makes building with Qt really tedious and automatic building is out of the question.

    @SGaist: your comment about the Info.plist does not cover this topic. Basically a new target is created within the XCode project file. The logic for how to compile and codesign this part is in the project.pbxproj file.

    What I found so far is that code generation for the project.pbxproj file takes place in pbuilder_pbx.cpp - but I have not found a solution to include XCode Targets (not Qt targets) to add iOS extensions. Most likely this could be solved by adding a new TEMPLATE type, but this is only my thought after looking through this for an afternoon.

    If anybody has any other ideas on how to solve this, I would be very happy!

Log in to reply

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