各位大大
想请教是否有办法 在app中让使用者能够去开关notificaiton的声音
主要是让该app在背景时收到notification能够以使用者的设定去
决定要不要有音效的产生。
尝试过的情况
1. 我如果设定以下的code,在背景时还是会有音效产生
[[UIApplication sharedApplication] registerForRemoteNotificationTypes:
UIRemoteNotificationTypeAlert|UIRemoteNotificationTypeBadge];
2. 多加UIRemoteNotificationTypeSound,在setting中的Notification Center 该
app会多一栏Sounds可以swith,关掉就后收到notification就不会有声音了
但还是希望让使用者可以不用到setting中,直接在app里可以开关背景时收到notification
的音效
谢谢