- 简化推送的代码逻辑,这个使用的 jpush 作为拓展,只需要设置3方 sdk 的 key 和 一个 收到推送的 block 即可
- 借鉴于 jiaAppDelegate 的,[jiaAppDelegate]
- 借推送测试工具
source 'https://github.com/tpctt/Specs.git'
pod 'TimJpush'
+(void)load
{
[super load];
///设置极光的 push 方案
[TimJpushConfigManager sharedInstance].enableJpush = YES;
[TimJpushConfigManager sharedInstance].pushAppKey = @"XXXX";
[TimJpushConfigManager sharedInstance].apsForProduction = YES;
}
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Override point for customization after application launch.
__weak AppDelegate *weak_self =self;
self.pushBlock = ^(NSDictionary *userInfo, UIApplicationState state){
///do it by yourself
//STRONG_SELF
};
return YES;
}