You can register a delegate using the dmExtension::RegisteriOSUIApplicationDelegate
It seems the documentation is a bit weird looking currently, so I post it here too. It uses a global constructor in order to be able to add it self as early as possible during the app startup.
// myextension_ios.mm
id<UIApplicationDelegate> g_MyApplicationDelegate;
@interface MyApplicationDelegate : NSObject <UIApplicationDelegate>
- (void) applicationDidBecomeActive:(UIApplication *) application;
@end
@implementation MyApplicationDelegate
- (void) applicationDidBecomeActive:(UIApplication *) application {
dmLogWarning("applicationDidBecomeActive - MyAppDelegate");
}
@end
struct MyAppDelegateRegister
{
MyApplicationDelegate* m_Delegate;
MyAppDelegateRegister() {
m_Delegate = [[MyApplicationDelegate alloc] init];
dmExtension::RegisteriOSUIApplicationDelegate(m_Delegate);
}
~MyAppDelegateRegister() {
dmExtension::UnregisteriOSUIApplicationDelegate(m_Delegate);
[m_Delegate release];
}
};
MyAppDelegateRegister g_FacebookDelegateRegister;
Here’s an actual example from extension-facebook