The last two chapters spent an incredible amount of time on dealing with information stored and persisted inside a device’s memory. Now, we will deal with an entirely opposite topic: data from the outside world—not in the sense of data given by the user, but instead, data collected by the device about the universe in which it exists at any given second. By retrieving information about the outside world, a developer can specifically build applications focused on enhancing the user’s experience based on his or herphysical situation. This could be anything from simply detecting the orientation of the device to incorporating rotation into a racing game’s steering system, to using an accelerometer to measure the acceleration of a roller coaster. Through the use of the Core Motion framework, we are able to accesswith great ease a variety of hardware built into our iOS device in order to acquire such unique information, from magnetic fields, to accelerations, both by gravity and otherwise, to rotation rates, about the specific situation of our device.
KeywordsReference Frame Roller Coaster Head File Magnetic North Window Property
Unable to display preview. Download preview PDF.