I'm developing on Cocoa using Xcode. I was wondering if there is a way to lock the embedded resources of my app, like logos, images, sounds, ... so nobody can change them?
Asked
Active
Viewed 144 times
1 Answers
2
Probably the easiest way would be to check timestamps on the resources, but this is also easy to circumvent. A better way would be to compute the hash of your application's resources directory on launch, and compare to a known value.
If any of the resources have been modified then the hash will differ and you can show a message and quit. You could use a custom build script step in Xcode to calculate the hash and have it available at compile time so that the process is all automated.

danpalmer
- 2,163
- 4
- 24
- 41
-
Thank you for your answer, I'm familiar with hashing approach, I was looking to see if there is a built-in method in Xcode. Also the custom build script that you suggested is an interesting way to do it. – Abcd Efg Oct 04 '12 at 19:57