Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. How to add Target in Qt IOS project file eg. share extension ?
Forum Updated to NodeBB v4.3 + New Features

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

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
11 Posts 8 Posters 3.6k Views 4 Watching
  • 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.
  • S Offline
    S Offline
    SGaist
    Lifetime Qt Champion
    wrote on 13 Feb 2017, 23:06 last edited by
    #2

    Hi and welcome to devnet,

    What do you mean by share extension ?

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

    P 1 Reply Last reply 14 Feb 2017, 07:05
    0
    • S SGaist
      13 Feb 2017, 23:06

      Hi and welcome to devnet,

      What do you mean by share extension ?

      P Offline
      P Offline
      pkumar
      wrote on 14 Feb 2017, 07:05 last edited by
      #3

      @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.

      1 Reply Last reply
      0
      • S Offline
        S Offline
        SGaist
        Lifetime Qt Champion
        wrote on 14 Feb 2017, 11:02 last edited by
        #4

        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.

        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
        0
        • G Offline
          G Offline
          GTDev
          wrote on 16 Feb 2017, 10:10 last edited by GTDev
          #5

          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.", "http://www.v-play.net/qt")
            }
          }
          

          Best,
          Günther

          Senior Developer at Felgo - https://felgo.com/qt

          Develop mobile Apps for iOS & Android with Qt
          Felgo is an official Qt Technology Partner

          1 Reply Last reply
          0
          • T Offline
            T Offline
            tk.fs
            wrote on 8 May 2017, 18:32 last edited by
            #6

            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!

            1 Reply Last reply
            1
            • U Offline
              U Offline
              upenya
              wrote on 12 Sept 2018, 15:30 last edited by upenya 9 Dec 2018, 21:41
              #7

              After an hours of researching finally I've found a solution (using qmake).
              Create an empty xcode project, add some *Extension target to it. After build copy myextension.appex to directory named "PlugIns" inside main project (see https://codereview.qt-project.org/#/c/160746/), other directory names won't let qmake to embed extension correctly. Than add next lines to .pro:

              plugins.path = PlugIns
              plugins.files = $$IOS_PACKAGE_SOURCE_DIR/PlugIns/myextension.appex
              QMAKE_BUNDLE_DATA += plugins
              

              Hope it can be useful!

              1 Reply Last reply
              0
              • P pkumar
                13 Feb 2017, 06:37

                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.

                T Offline
                T Offline
                TobbY
                wrote on 12 Sept 2018, 17:16 last edited by TobbY 9 Dec 2018, 17:18
                #8

                @pkumar i think Qt currently doesn't support easy way right now to share extension through Qt Project file. the only possible way is to create an extension and add it to your info.plist.

                1 Reply Last reply
                0
                • L Offline
                  L Offline
                  lockheed
                  wrote on 2 Feb 2019, 16:23 last edited by
                  #9

                  @upenya Your code is only including .appex into the app bundle, but it's not adding a second target to the project. Am I wrong?

                  @TobbY Could you provide some more details about it? How to add extension with info.plist?

                  I think this is a pretty serious flaw. For example, there is no way to implement file sharing or push notifications without iOS extensions. There must be some kind of workaround.

                  E 1 Reply Last reply 3 Feb 2019, 12:41
                  0
                  • L lockheed
                    2 Feb 2019, 16:23

                    @upenya Your code is only including .appex into the app bundle, but it's not adding a second target to the project. Am I wrong?

                    @TobbY Could you provide some more details about it? How to add extension with info.plist?

                    I think this is a pretty serious flaw. For example, there is no way to implement file sharing or push notifications without iOS extensions. There must be some kind of workaround.

                    E Offline
                    E Offline
                    ekkescorner
                    Qt Champions 2016
                    wrote on 3 Feb 2019, 12:41 last edited by
                    #10

                    @lockheed said in How to add Target in Qt IOS project file eg. share extension ?:

                    I think this is a pretty serious flaw. For example, there is no way to implement file sharing or push notifications without iOS extensions.

                    File Sharing is working - see my example project and Qt Blog Series about sharing
                    https://github.com/ekke/ekkesSHAREexample

                    ekke ... Qt Champion 2016 | 2024 ... mobile business apps
                    5.15 --> 6.8 https://t1p.de/ekkeChecklist
                    QMake --> CMake https://t1p.de/ekkeCMakeMobileApps

                    L 1 Reply Last reply 11 Feb 2019, 19:09
                    1
                    • E ekkescorner
                      3 Feb 2019, 12:41

                      @lockheed said in How to add Target in Qt IOS project file eg. share extension ?:

                      I think this is a pretty serious flaw. For example, there is no way to implement file sharing or push notifications without iOS extensions.

                      File Sharing is working - see my example project and Qt Blog Series about sharing
                      https://github.com/ekke/ekkesSHAREexample

                      L Offline
                      L Offline
                      lockheed
                      wrote on 11 Feb 2019, 19:09 last edited by
                      #11

                      @ekkescorner I've already read your series, and really appreciate it. But, there are several functionalities, which can't be achieved without shared extensions, like push notifications.

                      1 Reply Last reply
                      0

                      • Login

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Users
                      • Groups
                      • Search
                      • Get Qt Extensions
                      • Unsolved