[Interest] How to get didFinishLaunchingWithOptions called in IOS delegate?

Yang Fan missdeer at gmail.com
Wed Dec 3 03:21:26 CET 2014


>(Note that you can also add your own observer for this using
UIApplicationDidFinishLaunchingNotification)

Any document?

On Tue, Dec 2, 2014 at 6:24 PM, Gustavsen Richard <
Richard.Gustavsen at theqtcompany.com> wrote:

>  Why do you need to override didFinishLaunchingWithOptions in this case?
> Can't you just call
>
> [UIApplication sharedApplication] setMinimumBackroundFetchInterval:..]
> from e.g main.mm or somwhere else in your app?
>
>
>  (Note that you can also add your own observer for
> this using UIApplicationDidFinishLaunchingNotification)
>
>
>  -Richard
>
>
>  ------------------------------
> *Fra:* interest-bounces+richard.gustavsen=theqtcompany.com at qt-project.org
> <interest-bounces+richard.gustavsen=theqtcompany.com at qt-project.org> på
> vegne av 解晶 <xie_jing at cdv.com>
> *Sendt:* 2. desember 2014 09:55
> *Til:* Yang Fan
> *Kopi:* Qt Project
> *Emne:* Re: [Interest] How to get didFinishLaunchingWithOptions called in
> IOS delegate?
>
>   Thans, Yang Fan. If has no good solution will use this method. All
> develop machines will have to set an environment
> and the header path may change in the future version. I wonder if there is
> any other good method to get the didFinishLaunchingWithOptions
> called?
>
>
>
>
>
> 在 2014-12-02 16:27:12,"Yang Fan" <missdeer at gmail.com> 写道:
>
> Set an environment QTDIR and add it to INCLUDEPATH.
>
> On Tue, Dec 2, 2014 at 1:58 PM, 解晶 <xie_jing at cdv.com> wrote:
>
>>  Hi!
>>     I have a qt application for ios and try to
>> get didFinishLaunchingWithOptions() called.
>> I got it work by extending QIOSApplicationDelegate like the followings:
>>
>>  #import ".../qtbase/src/plugins/platforms/ios/QIOSApplicationDelegate .h
>> "
>> @implementation QIOSApplicationDelegate
>>
>> - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
>>
>> {
>>
>>     [application setMinimumBackgroundFetchInterval:UIApplicationBackgroundFetchIntervalMinimum];
>>
>>     ...
>>
>>     return YES;
>>
>> }
>>
>>  @end
>>
>>      It really works but i have to import the absolute path of
>> QIOSApplicationDelegate .h because i can't find the header file
>> in qt include folder. It may cause compile failed on other computers and
>> i have to change my code if the path changed.
>> So is there a better way to call the didFinishLaunchingWithOptions in qt applications
>> for ios?
>>
>>  thanks!
>>
>>
>> _______________________________________________
>> Interest mailing list
>> Interest at qt-project.org
>> http://lists.qt-project.org/mailman/listinfo/interest
>>
>>
>
>
>  --
>  Regards,
> Fan Yang
>
>


-- 
Regards,
Fan Yang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20141203/f9a66411/attachment.html>


More information about the Interest mailing list