【iOS推送】集成umeng时的遇到的一些问题
2015-04-22 20:14
344 查看
1.获取不到设备的 DeviceToken ,didRegisterForRemoteNotificationsWithDeviceToken 方法不执行
答:-我的错误就是这个配置不对 ,bundleid 和 证书 、描述文件不匹配。(下图是配置好了的)
-对于DeviceToken获取不到的其他问题:-网络不好啦 -证书不对啦 -通知关闭就不说了
2.关于iOS8的问题,下面是umeng sdk 写的
答:
3.errorcode:5000 第一次返回是success ,再后来每次都是报5000(device_id错误)
答:这是后台的错。ios如果是没有上线,都是测试模式,后台需要添加"production_mode":"false"
答:-我的错误就是这个配置不对 ,bundleid 和 证书 、描述文件不匹配。(下图是配置好了的)
-对于DeviceToken获取不到的其他问题:-网络不好啦 -证书不对啦 -通知关闭就不说了
2.关于iOS8的问题,下面是umeng sdk 写的
答:
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= _IPHONE80_ if(UMSYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"8.0")) { //register remoteNotification types UIMutableUserNotificationAction *action1 = [[UIMutableUserNotificationAction alloc] init]; action1.identifier = @"action1_identifier"; action1.title=@"Accept"; action1.activationMode = UIUserNotificationActivationModeForeground;//当点击的时候启动程序 UIMutableUserNotificationAction *action2 = [[UIMutableUserNotificationAction alloc] init]; //第二按钮 action2.identifier = @"action2_identifier"; action2.title=@"Reject"; action2.activationMode = UIUserNotificationActivationModeBackground;//当点击的时候不启动程序,在后台处理 action2.authenticationRequired = YES;//需要解锁才能处理,如果action.activationMode = UIUserNotificationActivationModeForeground;则这个属性被忽略; action2.destructive = YES; UIMutableUserNotificationCategory *categorys = [[UIMutableUserNotificationCategory alloc] init]; categorys.identifier = @"category1";//这组动作的唯一标示 [categorys setActions:@[action1,action2] forContext:(UIUserNotificationActionContextDefault)]; UIUserNotificationSettings *userSettings = [UIUserNotificationSettings settingsForTypes:UIUserNotificationTypeBadge|UIUserNotificationTypeSound|UIUserNotificationTypeAlert categories:[NSSet setWithObject:categorys]]; [UMessage registerRemoteNotificationAndUserNotificationSettings:userSettings]; } else{ //register remoteNotification types [UMessage registerForRemoteNotificationTypes:UIRemoteNotificationTypeBadge |UIRemoteNotificationTypeSound |UIRemoteNotificationTypeAlert]; } #else //register remoteNotification types [UMessage registerForRemoteNotificationTypes:UIRemoteNotificationTypeBadge |UIRemoteNotificationTypeSound |UIRemoteNotificationTypeAlert]; #endif
3.errorcode:5000 第一次返回是success ,再后来每次都是报5000(device_id错误)
答:这是后台的错。ios如果是没有上线,都是测试模式,后台需要添加"production_mode":"false"
相关文章推荐
- iOS开发之适配IPV6更新网络处理为AFNetworking3.x, 集成以及遇到的一些问题总结。
- iOS 友盟推送中遇到的一些问题
- iOS使用TFHpple解析HTML遇到的一些问题
- 我在ios游戏开发中遇到的一些问题
- ios中最近遇到的一些问题
- iOS集成极光推送,绕过一些坑
- ios 集成 支付宝 遇到的各种问题 总结
- iOS开发中遇到的一些问题以及解决办法总结
- iOS 发布遇到的一些问题
- iOS集成支付宝遇到的问题一:Cannot find interface declarationfor'NSObject', superclass of'Base64'
- 集成百度导航SDK遇到的一些问题。
- (持续更新)日积月累——iOS开发过程中遇到的一些小问题
- 适配 iOS 8 时遇到的问题两则:远程推送和 Unwind Segue
- iOS 开发,xcode7中用QQ授权登录遇到的一些问题 QQ登录不跳客户端
- iOS推送遇到的问题
- iOS xib自动布局时遇到的一些问题
- iOS集成友盟分享时的一些问题
- iOS 制作自己的FrameWork遇到的一些问题 以及FrameWork通过包合并支持arm64 armv7 i386 架构
- android集成apk对一些问题经常遇到系统
- IOS 导航栏(状态栏)透明遇到的一些问题