Parse platform 使用解析iOS禁用推送通知的振动

Parse platform 使用解析iOS禁用推送通知的振动,parse-platform,Parse Platform,在使用Parse for iOS接收推送时,有没有办法禁用振动和声音 我想推动,使没有声音或振动,只是显示在接收设备上 非常感谢 请从发送推送通知的服务器上的代码中删除声音参数 e、 g 如果您使用的是Objective C,则需要将其从AppDelegate.m中删除,在AppDelegate.m中注册通知。你的代码应该是这样的 [[UIApplication sharedApplication] registerUserNotificationSettings:[UIUserNotifica

在使用Parse for iOS接收推送时,有没有办法禁用振动和声音

我想推动,使没有声音或振动,只是显示在接收设备上


非常感谢

请从发送推送通知的服务器上的代码中删除声音参数

e、 g


如果您使用的是Objective C,则需要将其从AppDelegate.m中删除,在AppDelegate.m中注册通知。你的代码应该是这样的

[[UIApplication sharedApplication] registerUserNotificationSettings:[UIUserNotificationSettings settingsForTypes:(UIUserNotificationTypeSound | UIUserNotificationTypeAlert | UIUserNotificationTypeBadge) categories:nil]];
    [[UIApplication sharedApplication] registerForRemoteNotifications];
你可以从这里移除声音来阅读

[[UIApplication sharedApplication] registerUserNotificationSettings:[UIUserNotificationSettings settingsForTypes:(UIUserNotificationTypeAlert | UIUserNotificationTypeBadge) categories:nil]];
    [[UIApplication sharedApplication] registerForRemoteNotifications];
希望这有帮助

[[UIApplication sharedApplication] registerUserNotificationSettings:[UIUserNotificationSettings settingsForTypes:(UIUserNotificationTypeAlert | UIUserNotificationTypeBadge) categories:nil]];
    [[UIApplication sharedApplication] registerForRemoteNotifications];