ios友盟推送更新logo右上角数字

ios友盟推送更新logo右上角数字,第1张

友盟推送更新logo右上角数字的方法是:

1. 首先,登录友盟推送官网,进入应用管理页面,找到你要更新logo右上角数字的应用;

2. 进入应用设置页面,找到“推送设置”栏目;

3. 在“推送设置”页面中,找到“消息提醒”栏目,勾选“开启应用图标右上角显示未读消息数”;

4. 点击“保存”按钮,完成logo右上角数字的更新。

1、可以定制标题和OK键的文字

标题的字符串为:NSLocalizedString(@"Notification",@"Notification")

OK的字符串为:NSLocalizedString(@"OK", @"OK")

实现@"Notification"和"OK"的多语言(添加至Localizable.strings)即可

如果你对 iOS 的多语言不太了解,请自行搜索 iOS 多语言

2、如需其他要求需要关闭系统的d出框,然后自行实现

注意

此方法会丢失App在前台消息的点击统计,你需要主动使用补发统计接口sendClickReportForRemoteNotification

比如需要两个按钮,自定义d出按钮的UI等等

请在 didReceiveRemoteNotification 中添加d出框

- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo

{

//关闭友盟对话框

[UMessage setAutoAlert:NO]

//此方法不要删除

[UMessage didReceiveRemoteNotification:userInfo]

// app was already in the foreground

if([UIApplication sharedApplication].applicationState == UIApplicationStateActive)

{

UIAlertView * alert = [[UIAlertView alloc] initWithTitle:@"title"

message:@"message"

delegate:self

cancelButtonTitle:@"OK"

otherButtonTitles:nil]

[alert show]

}

}

- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex

{

[UMessage sendClickReportForRemoteNotification:self.userInfo]

}


欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/bake/11927247.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2023-05-19
下一篇2023-05-19

发表评论

登录后才能评论

评论列表(0条)

    保存