极光推送添加设备别名

最新的极光推送中首先是要初始化APPkey,然后再设置对应的设备名

//生产

//    [JPUSHService setupWithOption:launchOptions appKey:@"你的key"

//                          channel:@"Publish channel"

//                apsForProduction:1

 //            advertisingIdentifier:advertisingId];

    //生产2

    [JPUSHService setupWithOption:launchOptions appKey:@"你的key"

                          channel:@"Publish channel"

                 apsForProduction:1

            advertisingIdentifier:advertisingId];

设置配置名:

- (void)setUpJpush{

    NSString*str =@"";

    if([defaultsobjectForKey:CUSTOMER_ID]) {

        str = [defaultsobjectForKey:CUSTOMER_ID];

    }

    NSSet *tags = [NSSet setWithObject:str];

    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.0f * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{

        [JPUSHServicesetTags:tagscompletion:^(NSIntegeriResCode,NSSet*iTags,NSIntegerseq) {


        }seq:0];

    });

}

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容