Notification without a message in iOS, how? Is there a name for that? Alarm, alert, reminder? [closed]

StackOverflow https://stackoverflow.com/questions/14165954

Вопрос

I have seen some iphone apps that only play a sound in background without showing any Notification message or body in iOS. How do they that? I've tried searching for Sound notification only but no luck. Is there a name for that and I happen to search for the wrong function? What is it called and what's the code for such a thing?

I'm trying to play a multiple custom sound notifications that occur every 15 mins and/or at the head of every hour. I would highly appreciate your help displaying the code to for me so I can copy it to Xcode. Thank you very much.

Это было полезно?

Решение

I think you're looking for UILocalNotification. Don't set the alertBody property and it won't show an alert, use the soundName property to specify a sound instead. It seems like you want periodical notifications, so have a look at the repeatInterval and repeatCalendar properties as well.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top