#import <UIKit/UIKit.h>
#import "iCore.h"
@interface B4IMyDelegate : B4IAppDelegate
@end
@implementation B4IMyDelegate {
void (^complete)(UIBackgroundFetchResult);
}
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult result))completionHandler {
NSLog(@"didReceiveRemoteNotification fetchCompletionHandler");
self->complete = completionHandler;
[super application:application didReceiveRemoteNotification:userInfo];
}
- (void)complete:(int)result {
self->complete((UIBackgroundFetchResult) result);
}
@end
int main(int argc, char * argv[])
{
@autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([B4IMyDelegate class]));
}
}