Storing sensitive data in iOS Apps
Warning
This post is more than a year old. Information may be outdated.
One way that doesn't work: Using environment variables
- If you click the app name from the top bar in Xcode, you can
edit scheme.
- You can try settings values at Run → Arguments → Environment Variables and access them through
ProcessInfo.processInfo.environment["KEY"].
-
However, this didn't work for me. Refer to this problem on Stack Overflow.
-
ProcessInfo.processInfo.environment variables work in Simulator but not on Device
One possible but unsafe way: xcconfig
- Create
.xcconfigand add them to app build settings. - Is it safe? No!
Backlinks1
221119Comments