Does the iOS SDK support system services’ event handling? I mean, could I have my app listening for external events such as sms reception, battery level of charge…
I was looking for documentation at iOS developers’ site, and it looks like the only types of events I can handle are user events when interacting with the UI, events triggered by UI controls, Cocoa events, accelerometer and GPS events: Event Handling Guide for iOS
Are those actually all the events that can be listened in an app, or am I missing some other documentation about system events as the ones I mentioned?
Thanks
Checkout NSNotificationCenter.
For battery level change look at UIDeviceBatteryLevelDidChangeNotification defined in UIDevice – you can do:
Here’s an apple sample:
http://developer.apple.com/library/ios/#samplecode/BatteryStatus/Introduction/Intro.html#//apple_ref/doc/uid/DTS40008812-Intro-DontLinkElementID_2
Not sure about SMS events – found mentions of it not being available via public APIs but that may have changed. Not aware of anything.