Hi everyone,
I’m looking for clarification on best practices for storing API keys in an iOS app — for example, keys used with RevenueCat, PostHog, AWS Rekognition, barcode scanners, and similar third-party services.
I understand that hard-coding API keys directly in the app’s source code is a bad idea, since they can be extracted from the binary. However, using a .plist file doesn’t seem secure either, as it’s still bundled with the app and can be inspected.
I’m wondering:
What are Apple’s recommended approaches for managing these kinds of keys?
Does Xcode Cloud offer a built-in or best-practice method for securely injecting environment variables or secrets at build time?
Would using an external service like AWS Secrets Manager or another server-side solution make sense for this use case?
Any insights or examples of how others are handling this securely within Apple’s ecosystem would be greatly appreciated.
Thanks for considering my questions!
— Paul
Topic:
Privacy & Security
SubTopic:
General