|
/

iOS端推送回传点击数据异常

1150***@qq.com
发布于 4 年前
114来自北京
消息推送 U-Push
功能使用

问题描述:iOS客户端初始化友盟推送,增加延迟函数5s造成点击回传数据失败

操作步骤:

1.在App杀死状态下,点击远端推送进入App

2.在didFinishLaunchingWithOptions中增加5秒延迟函数,再去调用推送注册方法,代码如下。

会造成点击数据回传失败,麻烦解释下友盟这边是做了什么特殊处理吗,谢谢

@interface AppDelegate ()<UNUserNotificationCenterDelegate>

@property (nonatomic, strong) NSDictionary *launchOptions;

@end


- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {


self.launchOptions = launchOptions;

__weak __typeof__(self) weakSelf = self;

dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(5.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[weakSelf setupUmengPush];
});

return YES;
}

- (void)setupUmengPush{
UMessageRegisterEntity * entity = [[UMessageRegisterEntity alloc] init];
entity.types = UMessageAuthorizationOptionBadge | UMessageAuthorizationOptionAlert | UMessageAuthorizationOptionSound;
[UNUserNotificationCenter currentNotificationCenter].delegate = self;
[UMessage registerForRemoteNotificationsWithLaunchOptions:self.launchOptions Entity:entity completionHandler:^(BOOL granted, NSError * _Nu llable error) {

}];
}
1个回答
 
4 年前
来自上海

这个问题楼主可以提个工单咨询一下友盟官方技术官

Loading ...
登录社区,分享你的经验