xvi Contents
Employing File Protection .....................................................248
Using Keychains ..............................................................250
Sharing Data with Access Groups ................................................251
Using Encryption ..............................................................253
Overview of AES .................................................................254
Converting Passwords to Keys with PBKDF2 ......................................254
AES Mode and Padding ..........................................................256
The Initialization Vector (IV) ......................................................258
Authentication with HMAC ......................................................259
Bad Passwords ..................................................................259
Combining Encryption and Compression ........................................260
Summary .....................................................................260
Further Reading ...............................................................260
Apple Documentation ...........................................................260
WWDC Sessions .................................................................260
Other Resources .................................................................261
Chapter 15 Running on Multiple iPlatforms, iDevices,
and 64-bit Architectures
.......................................................263
Developing for Multiple Platforms .............................................264
Congurable Target Settings: Base SDK versus Deployment Target ...............264
Conguring the Base SDK Setting ...................................................264
Conguring the Deployment Target Setting ........................................264
Considerations for Multiple SDK Support: Frameworks,
Classes, andMethods .........................................................265
Framework Availability .............................................................265
Class Availability ....................................................................265
Method Availability .................................................................266
Checking the Availability of Frameworks, Classes, and Methods ..................266
Developer Documentation ..........................................................267
Macros in iOS Header Files ..........................................................267
Detecting Device Capabilities .................................................268
Detecting Devices and Assuming Capabilities ....................................268
Detecting Hardware and Sensors ................................................268
Detecting Camera Types ............................................................269
Detecting Whether a Photo Library Is Empty ........................................270
Detecting the Presence of a Camera Flash ..........................................270
Detecting a Gyroscope ..............................................................271
Detecting a Compass or Magnetometer ............................................271
Detecting a Retina Display ..........................................................271