(BOOL)application:(UIApplication )application didFinishLaunchingWithOptions:(NSDictionary )launchOptions { [application setMinimumBackgroundFetchInterval:UIApplicationBackgroundFetchIntervalMinimum]; // Override point for customization after application launch. NSLog(@"DId this launch option happen"); return YES; } 但是始终没有触发该回调 无力挣扎,去查阅了Qt iOS源码 发现也有次代理UI,但是没有找到入口
toby520
2015-02-10 10:35
彩阳
2015-02-10 13:07
解决了没有?iOS我们全指望居士了。
toby520
2015-02-10 17:42
qt混合obj-c注意的实现 I did my homework … and I solved the problem. I post here a sketch of the solution: create at least two files: myNativeWrapperFunctions.h e myNativeWrapperFunctions.mm; The .h file declare C functions that can be called from C++ and in the .mm file they will implemented using objective-C and accessing to the native iOS frameworks simply add the .h to the HEADERS and .mm to SOURCES into the QMake project using QMake create the XCode project; XCode knows how to compile .mm files (that’s indicate objective-C that can be mixed with C++) include the header myNativeWrapperFunctions.h into a C++ source code and call the functions
// We prefer to keep the root viewcontroller in fullscreen layout, so that // we don't have to compensate for the viewcontroller position. This also // gives us the same behavior on iOS 5/6 as on iOS 7, where full screen layout // is the only way. if (iosVersion < QSysInfo::MV_IOS_7_0) self.window.rootViewController.wantsFullScreenLayout = YES;
// Use translucent statusbar by default on iOS6 iPhones (unless the user changed // the default in the Info.plist), so that windows placed under the stausbar are // still visible, just like on iOS7. if (iosVersion >= QSysInfo::MV_IOS_6_0 && iosVersion < QSysInfo::MV_IOS_7_0 && [UIDevice currentDevice].userInterfaceIdiom == UIUserInterfaceIdiomPhone && [UIApplication sharedApplication].statusBarStyle == UIStatusBarStyleDefault) [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleBlackTranslucent]; #endif
In order to integrate the Facebook SDK into iOS application, some delegates needs to be implemented. One of those, regards the UIApplicationDelegate application:openURL:sourceApplication:annotation. In a fully native iOS application this is not a problem, but in Qt application there is already one delegate, QIOSApplicationDelegate, used by Qt and cannot be specified more than one delegate. At the moment there is a bug opened for solving this issues (QTBUG-38184), and in the meanwhile the only way is to exploit the functionality of Objective-C and do some sort of hacking to implement the delegate into QIOSApplicationDelegate. This sort of hack use the Objective-C categories, and if in your project there is only QtFacebook that do this kind of hack to QIOSApplicationDelegate then all is fine. But, this way to solve the problem may conflict with some other libraries that apply the same hack to solve this issues. Pay attention.