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