Implementing and Testing iOS data protection

前端 未结 7 1450
傲寒
傲寒 2020-11-28 05:20

Just saw the Session 209 - Securing Application Data from de 2010 WWDC.

The keynote explains a lot of things, including the way you can set data protection attribute

7条回答
  •  忘掉有多难
    2020-11-28 05:44

    Testing can be done within Xcode:

    1. Delete and reinstall your app
    2. On your iOS device go to Settings > Passcode and ensure 'Require Passcode' is set to 'Immediately'
    3. Lock your phone and wait 20 seconds
    4. On Xcode go to Window > Devices
    5. Select the app you'd like to test
    6. Click the settings cog and choose 'download container'
    7. Right click the downloaded .xcappdata file and select 'show package contents'. Anything you can view here has not been encrypted by NSFileProtectionComplete
    8. Unlock your phone and repeat steps 3-6. Files that previously did not appear that you can now view were successfully encrypted.

提交回复
热议问题