You want to store values in the keychain and enable secure file storage for your app.
Create a provision profile for your app that has file protection enabled.
Provision profiles, as discussed earlier in Recipe 8.0, contain entitlements that dictate to iOS how your app utilizes the security functionalities in the operating system. On iOS Simulator, apps do not get codesigned and, therefore, these concepts will not make sense, but for debugging your app on a device or submitting your app to the App Store, you need to ensure that your app is signed with the correct provision profile, for both the Debug and the Release schemes.
I will show you the steps required to create a valid provision profile for your development, as well as Ad Hoc and the App Store. Follow these steps to create a valid development provision profile (with debugging enabled) for the apps that we are going to be working on in this chapter of the book. We start by creating an App ID:
I am assuming that you have already created valid development and distribution certificates for yourself.
Navigate to the iOS Dev Center and sign in with your username and password.
After you are signed in, find the iOS Developer Program section and choose Certificates, Identifiers & Profiles.
On the lefthand side of the screen, find and navigate to the App IDs section of the portal and press the plus button (+) to create a new App ID.
In the Name section, enter ...