[Interest] Qt iOS and App Extensions

Nuno Santos nunosantos at imaginando.pt
Mon May 22 10:45:16 CEST 2017


Milke,

Thanks for your reply.

I was not expecting an out of the box process. The problem is that I’m still lost.

Let me show you the big picture. I have a synthesiser app. One of the functionalities of App Extensions are Audio Units. I want to provide the ability of other apps running multiple instances of my synthesiser app. This is called AudioUnit (which in the context of iOS is a V3 AudioUnit) I have found a cocoa example here: https://github.com/EricGeorge/AUInstrument <https://github.com/EricGeorge/AUInstrument>

From the working example I need to have a the app, which I currently develop using Qt.

With the app development I always need Xcode in the end to enable app features such as inter-app audio, push notifications, etc since it is not possible to enable that on QtCreator. So, what I do is I run qmake and I have the generated Xcode project.

I also need to have a App Extension target which in the case of the example, links with a framework and makes part of the app membership, being placed inside the app target, under PlugIns dir.


I have already done an AudioUnit with Qt. in order to make an AudioUnit, the target is a plugin which generates a dynamic lib (dylib). The trick with Qt is that basically you need to handle the packaging yourself. There is the need of making a TARGET.component and make all the dirs inside, etc. 

I don’t believe an app extension will be any way different from this. Right now I just don’t know how to put everything together. Questions I have:

- What kind of target is an App Extension? dylib? Static lib? Exectuable? I think it might be a dylib just like a Mac OSX AudioUnit
- I think I will need to use Xcode anyway because of the code signing process
- I don’t know how to configure a target on Xcode that depends on Qt stuff without having qmake to generate all the stuff.

for now I’m just trying to handle project configuration issues. There will be an even more interesting challenge, which is to show a Qt app window, on the instance of the Audio Unit.

Any ideas?

Regards,

Nuno

> On 22 May 2017, at 09:21, Mike Krus <mike.krus at kdab.com> wrote:
> 
> As far as I know, qmake is not capable of generating Xcode projects with the right
> structure (need 2 to start with, different project types, etc).
> 
> Mike
> 
>> On 21 May 2017, at 11:13, Nuno Santos <nunosantos at imaginando.pt> wrote:
>> 
>> Robert,
>> 
>> There is clearly a communication problem here. Maybe I’m not using the correct word.
>> 
>> I want to know how to make an App Extension from QtCreator. In summary:
>> 
>> - In order to create an app extension with Qt Creator what should be the qmake flags?
>> 
>> I want to bypass Xcode. Is this possible?
>> 
>> Regards,
>> 
>> Nuno
>> 
>>> On 21 May 2017, at 10:12, Robert Iakobashvili <coroberti at gmail.com> wrote:
>>> 
>>> Yes, you can add frameworks to an extension like to
>>> any other project in XCode.
>>> 
>>> So it can look like:
>>> 
>>> Swift GUI <-> Obj-C-Bridging Code <-> C++ business logic using your
>>> frameworks/components.
>>> 
>>> But do not forget the memory limit - 30 MB.
>>> 
>>> Take care.
>>> 
>>> Kind regards,
>>> Robert
>>> 
>>> 
>>> On Sun, May 21, 2017 at 12:02 PM, Robert Iakobashvili
>>> <coroberti at gmail.com> wrote:
>>>> Dear Nuno,
>>>> Whatever I did was completely decoupled from Qt.
>>>> 
>>>> Only XCode project - it was an app with its bundle and within an app
>>>> it was a sub-app bundle.
>>>> 
>>>> But there are many types of extensions.
>>>> 
>>>> So, starting from an example of your extension and extending
>>>> it could be the right path.
>>>> 
>>>> If you find you still have memory up to 30 MB, you can link
>>>> QtCore if it helps you.
>>>> 
>>>> Your business logic could be in C++ and Swift interface can talk back
>>>> and forth with C++ via an objective-C Bridge - even with debugging
>>>> going smoothly between the pieces.
>>>> 
>>>> Sorry for being not too much helpful with a Qt-path.
>>>> Kind regards,
>>>> Robert
>>>> 
>>>> 
>>>> On Sun, May 21, 2017 at 11:51 AM, Nuno Santos <nunosantos at imaginando.pt> wrote:
>>>>> Robert,
>>>>> 
>>>>> Right now I’m more interested in how to put things together.
>>>>> 
>>>>> Were you able to do it?
>>>>> 
>>>>> Where are you coding the extension? With Qt Creator or Xcode?
>>>>> 
>>>>> How are you setting the project?
>>>>> 
>>>>> Can the app extension be deployed as a plugin? Like a .component? A dynamic
>>>>> library packed in a bundle?
>>>>> 
>>>>> Because I have already done a AudioUnit in the past and I can make it with
>>>>> Qt using the following flags:
>>>>> 
>>>>> CONFIG += lib_bundle shared
>>>>> 
>>>>> The thing is that QtCreator doesn’t handle the packaging so I have to
>>>>> manually do everything.
>>>>> 
>>>>> But as for App Extensions I don’t know exactly what they are. I have a Xcode
>>>>> example but with Xcode is always hard to decipher how things were made.
>>>>> 
>>>>> Regards,
>>>>> 
>>>>> Nuno
>>>>> 
>>>>> On 21 May 2017, at 05:20, Robert Iakobashvili <coroberti at gmail.com> wrote:
>>>>> 
>>>>> On Sat, May 20, 2017 at 7:54 PM, Nuno Santos <nunosantos at imaginando.pt>
>>>>> wrote:
>>>>> 
>>>>> HI,
>>>>> 
>>>>> I’m trying to develop an app extension for my Qt iOS app but I don’t know
>>>>> what kind of target it is.
>>>>> 
>>>>> I always try to use Qt Creator to handle my Qt based projects. In case of
>>>>> iOS projects I try to use only Xcode to deployment and debug.
>>>>> 
>>>>> Is an app extension a framework or a executable?
>>>>> 
>>>>> As anyone tried this before?
>>>>> 
>>>>> I want to know how to configure the app extension on Qt Creator .pro
>>>>> 
>>>>> Regards,
>>>>> 
>>>>> Nuno
>>>>> 
>>>>> 
>>>>> Hi Nuno,
>>>>> When doing it recently, it appears that there's a unpublished memory
>>>>> limit of up to 30 MB imposed by Apple that an extension is allowed.
>>>>> 
>>>>> Initially, I was planning to use Swift interface with QtCore classes in my
>>>>> core logic connected by an Objective-C Bridge.
>>>>> 
>>>>> However, due to the memory limitations, I've migrated from Qt to
>>>>> some C-written hash maps, etc containers with less pointers and less
>>>>> consumption of memory.
>>>>> 
>>>>> Take care.
>>>>> 
>>>>> Kind regards,
>>>>> Robert
>>>>> 
>>>>> 
>> 
>> _______________________________________________
>> Interest mailing list
>> Interest at qt-project.org
>> http://lists.qt-project.org/mailman/listinfo/interest
> 
> --
> Mike Krus | mike.krus at kdab.com | Senior Software Engineer
> KDAB (UK) Ltd., a KDAB Group company
> Tel: UK Office +44 1625 809908   Mobile +44 7833 491941
> KDAB - The Qt Experts
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20170522/98b2f78c/attachment.html>


More information about the Interest mailing list