4

I'm working on a little SDK which has a configFile.plist file to store things like secret key. Developer who implement this SDK in his app, and other users will download the app, they will be able to go into the app binary and change anything in the .plist file.

Is there any way to store this info without letting users modifing the parameters easily? I don't want users to have the ability to change the parametes in the .plist file.

Thanks in advance for any help!

Yosi Dahan
  • 441
  • 6
  • 19
  • The app will not run on a device if the resources have changed because it is signed with the developer's identity. The app would have to be resigned for that to happen. The only people who can do this are official iOS developers. What exactly are you trying to prevent here? Normal users will not be able to change anything. – Mike Weller Jun 01 '12 at 10:25

2 Answers2

2

When it comes to plist storage, it's easily accessible either way. Your best option is to provide a class file for configuration, and not a plist. Example below..

//Config.h

#define SHARED_SECRET @"2390849028349829384"
#define SOME_OTHER_VALUE 1

..and so on, this way, the class file is compiled with the App, and not visible to the user but accessible by the developer. Once you #import "Config.h", you can use SHARED_SECRET and SOME_OTHER_VALUE in place of the value itself within the code. If this suffices as a solution to your question, mark it as the answer. Hope it helps..

skram
  • 5,314
  • 1
  • 22
  • 26
1

Keeping in mind that people are going to be able to see/change almost anything with the right tools, you can't prevent people from hacking this.

If the key is going to be different for each user of the SDK, then you might want to make it the Developer's responsibility and have them provide the private key to you using a delegate method. That will make it their problem, and it will make it easier for them to compile the key directly into code, which is going to be less obvious for the end-user to access.

gaige
  • 17,263
  • 6
  • 57
  • 68