If you create a compiled app with a given name, say Frog.app, can the application detect that the user has used the Finder to change the name. The purpose would be to allow a user to have multiple instances of the same app differentiated by the user herself.
Say FrogA.app, FrogB.app & FrogC.app.
Each app instance could then have its own ApplicationData folder to store the static data that “characterized” that app instance.
I have created an app that allows the user to highly customize its user interface. The data that stores this customization is in the ApplicationData folder for the application. My problem is trying to figure out in the application itself what name the user has assigned in the Finder to the that instance of the application.
As the developer I could provide say, ten instances of the app, distinguished only by a single constant in the App itself (say “FrogA” in one, “FrogB” in the next etc.) But this seems extremely awkward. And ultimately limits the number of instances a user can access. If there was a way that the app itself could detect any name that the user created, that would solve the problem. The user would create as many copies of the app as they wished and then give them each a different name and the application could “use” that name.
You can read the name of the application bundle, to which you could manually create a fake bundle identifier “com.yourURL.frogA”. From this “fake” bundle identifier, you could then create a NSUserDefaults instance, that reads and writes the preferences for this instance (any preferences the system stores on your behalf would still go to the original preferences). You’d have to maintain an application support folder yourself.
You would however run into problems with the App Store as you’re not allowed to color outside of the lines. You’d end up having to maintain preferences and settings in a subfolder of the application support folder. You may also run into other issues in regards to the App Store DRM.