문제

I have added an sqlite DB to my iOS project and I would like it to be private, I don't want any user to see what is inside. But once created the .ipa file, if I change its extension to .zip and see what's in the package I have access to that sqlite file.

How can I add the sqlite file so that it's impossible to access it from the ipa file?

Cheers

도움이 되었습니까?

해결책

You can only make it more difficult to access the file, not make it impossible. One step you could take could be to encrypt the file in some fashion before it is placed in the IPA. Sure, the user could root out the key and decrypt it anyway, but it would stop the more casual users who are trying to snoop.

The prevailing theory is that it's much better to spend time investing in the software by adding features, enhancements, etc., for the paying users rather than spending time trying to stop a few users from misusing the software. You'll end up with a higher quality product that will perform better on the market.

다른 팁

Apple has provided several encryption APIs you can use so that no un-authorized person can access your data.

Note: It would still be possible for them to access the file, but if you use encryption properly, then only authorized parties are able to read the data.

Here's a tutorial on basic iOS security - http://www.raywenderlich.com/6475/basic-security-in-ios-5-tutorial-part-1

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top