想hook ios8中的通知更改,达到自己控制通知开关设置的目的
在ios8以下在SBRemoteNotificationServer中, 但是ios8中更换地方了, 不知道到哪里了
求指导
已解决:
UIUserNotificationType types = UIUserNotificationTypeNone;//UIUserNotificationTypeBadge | UIUserNotificationTypeSound | UIUserNotificationTypeAlert
UIUserNotificationSettings *settings = [UIUserNotificationSettings settingsForTypes:types categories:nil];
Class cls = objc_getClass("SBUserNotificationPermissionController");
SBUserNotificationPermissionController *cc = [cls controllerForBundleIdentifier:@"com.tencent.xin"];//[cls alloc] initWithBundleIdentifier:@"com.tencent.xin"];
//[cc registerUserNotificationSettings:settings makeAppDelegateCallback:NO];
[cc saveRegisteredUserNotificationSettings:settings];