14. Device-Specific Development

Each iOS device represents a meld of unique, shared, momentary, and persistent properties. These properties include the device’s current physical orientation, its model name, its battery state, and its access to onboard hardware. This chapter looks at devices—from their build configuration to their active onboard sensors. It provides recipes that return a variety of information items about the unit in use. You’ll read about testing for hardware prerequisites at runtime and specifying those prerequisites in the application’s Info.plist file. You’ll discover how to solicit sensor feedback via Core Motion and subscribe to notifications to create callbacks when sensor states change. You’ll read about adding screen ...

Get The Core iOS Developer’s Cookbook, Fifth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.