远程(离线)推送自定义推送声音,友盟、极光

一、极光推送很容易可以看到自定义推送声音的设置,名字不对了可以尝试添加格式后缀,如“shegnyin.m4a”

二、友盟的推送:已开始还真没找到,,,后台用参数一试,擦

友盟声音只支持:PCM、m4a (IMA/ADPCM)、?Law、aLaw必须是这4种格式之一,添加声音 必须是带后缀的“shengyin.m4a”

三、以友盟为例,执行相应事件

1、点击通知 处理事件

//iOS10以后接收的方法
-(void)userNotificationCenter:(UNUserNotificationCenter *)center didReceiveNotificationResponse:(UNNotificationResponse *)response withCompletionHandler:(void (^)())completionHandler{
    NSDictionary * userInfo = response.notification.request.content.userInfo;
   
NSString * uid = userInfo[@"uid"];
    
    NSLog(@"%@",userInfo);
  
    
}
原文地址:https://www.cnblogs.com/xujiahui/p/7306565.html