Is there any way to hide a property from being seen by the public when I have deployed my application to the app store?. I have an API key that I store inside a @property. I'm afraid that this easily could be sniffed by criminals.
Thanks in advance
Is there any way to hide a property from being seen by the public when I have deployed my application to the app store?. I have an API key that I store inside a @property. I'm afraid that this easily could be sniffed by criminals.
Thanks in advance
With Objective C's introspection any "hiding" is pretty useless.
Something simple would be to malloc a block of memory and store your API key as a C string in that malloc'ed memory. Then all hackers would see is a pointer address. Remember to free the memory manually.
If you do that, use a non-meaningul name, as property/iVar names can be discovered with introspection as well.
Finally, you could encrypt the API key, but you need to make sure to use encryption that's built into the OS so you don't run afoul of Apple's restrictions on apps containing encryption tech for export outside the USA.