[Interest] Is there a planned solution for QTBUG-38184

Robert Iakobashvili coroberti at gmail.com
Fri Oct 23 11:21:10 CEST 2015


Hi,
No idea if there are any plans, but this
good work-around was originally suggested by Tor Arne using categories.

It works correctly.

1. Arrange objective-C file in pro, like:

OBJECTIVE_SOURCES += my-app-delegate.mm

2. In my-app-delegate use:


#import <UIKit/UIKit.h>

// Declaration - no need to make include since QIOSApplicationDelegate
// is not going to change
@interface QIOSApplicationDelegate : UIResponder <UIApplicationDelegate>
@end


@interface QIOSApplicationDelegate (MyDelegate)

// Implement some callback missed in QIOSApplicationDelegate
-(BOOL)application:(UIApplication *)application
shouldAllowExtensionPointIdentifier:(NSString
*)extensionPointIdentifier;

// Over-write some callback do implemented in QIOSApplicationDelegate
-(BOOL)application:(UIApplication *)application
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
@end


@implementation QIOSApplicationDelegate (MyDelegate)


-(BOOL)application:(UIApplication *)application
shouldAllowExtensionPointIdentifier:(NSString
*)extensionPointIdentifier {
#pragma unused(application)
   if (([[[UIDevice currentDevice] systemVersion] compare:@"8.0"
options:NSNumericSearch] == NSOrderedDescending))
   {
        // Disallow custom keyboards
        return ![extensionPointIdentifier
isEqualToString:UIApplicationKeyboardExtensionPointIdentifier];
   }
   return YES;
}

-(BOOL)application:(UIApplication *)application
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Better first to call implementation from QIOSApplicationDelegate

    NSLog(@"didFinishLaunchingWithOptions: %@", [launchOptions description]);
    return YES;
}

@end

Take care,
Robert


On Fri, Oct 23, 2015 at 11:43 AM, Gian Maxera <gmaxera at gmail.com> wrote:
> Hello,
> is there a planned solution for this bug ?
>
> https://bugreports.qt.io/browse/QTBUG-38184
>
> Ciao,
> Gianluca.
>
>
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>



More information about the Interest mailing list