Hi,
I just read recently that some people are taking apps on the AppStore and changing the png graphics etc to rebrand and then putting their modified version back on the AppStore to sell. This probably could not get too out of hand, given the requirements to establish you are a legitimate business etc as part of selling apps, but I really don't see how you could tell if someone had done that to your app with the sheer quantity of apps in the store, so I decided to put a bit of protection in anyhow.
Basically it was just a simple package format that had a bit of header info for each file containing the name of the file and the size in bytes, and the file data all packed into a single file. I built a command line app to add files to a package etc so it could be run as a build step and found that it didn't impact build performance at all, well at least not noticeably. It's just as easy to load a png from data as it is filesystem using Apple's UIImage (just use initWithData instead of initWithContentsOfFile). In addition, I put some basic encryption (although I call it encoding) just to obfuscate the clear text names and e.g. the "PNG" bytes at the start of each png image. Due to US law encryption seems to be a big deal for apps in the AppStore. I think the US gov needs to ensure they can break your encryption and get access to your images in case of a national emergency.
Doing it this way was also good because it allowed the graphics to be organized outside of the code folder and didn't need to add all of the images into the project continually. Could just save another png into the folder and next time I built it would auto be included into the pkg.
One thing I found writing the command line tool is that default unix/linux shell behavior is to expand *.png as an argument - it goes and finds all files then adds them to the argument list, replacing the *.png you supplied. This was a really annoying "feature" and the workaround is to put quotes around it like:
Be interested to know if the rebranding has happened to anyone though.
I just read recently that some people are taking apps on the AppStore and changing the png graphics etc to rebrand and then putting their modified version back on the AppStore to sell. This probably could not get too out of hand, given the requirements to establish you are a legitimate business etc as part of selling apps, but I really don't see how you could tell if someone had done that to your app with the sheer quantity of apps in the store, so I decided to put a bit of protection in anyhow.
Basically it was just a simple package format that had a bit of header info for each file containing the name of the file and the size in bytes, and the file data all packed into a single file. I built a command line app to add files to a package etc so it could be run as a build step and found that it didn't impact build performance at all, well at least not noticeably. It's just as easy to load a png from data as it is filesystem using Apple's UIImage (just use initWithData instead of initWithContentsOfFile). In addition, I put some basic encryption (although I call it encoding) just to obfuscate the clear text names and e.g. the "PNG" bytes at the start of each png image. Due to US law encryption seems to be a big deal for apps in the AppStore. I think the US gov needs to ensure they can break your encryption and get access to your images in case of a national emergency.
Doing it this way was also good because it allowed the graphics to be organized outside of the code folder and didn't need to add all of the images into the project continually. Could just save another png into the folder and next time I built it would auto be included into the pkg.
One thing I found writing the command line tool is that default unix/linux shell behavior is to expand *.png as an argument - it goes and finds all files then adds them to the argument list, replacing the *.png you supplied. This was a really annoying "feature" and the workaround is to put quotes around it like:
- Code:
./Packager test.pkg -a "*.png"
Be interested to know if the rebranding has happened to anyone though.