I’m a total noob in submitting apps to the Mac app store. I got a copy of App Wrapper 3 and am making poor progress in figuring it out, so any assistance would be gratefully accepted!
First of all, I’m getting a warning after the build that states: “OS Creator Code should be a unique 4 letter string, not “”.” What does this mean and how do I fix it? I could find nowhere to specify an OS Creator Code.
Secondly, my application uses an external sqlite database. How do I include it in the package? I’ve poked around everywhere within AW3 and can’t find a place to specify these external files.
On the left hand side is the Navigator. Underneath where it says “Build Settings” it says " OS X".
Click on OS X, and then look on the right-hand side. It says “Inspector”. Click on that and you can then enter a 4 character creator code. I normally use “???”.
Regarding your database problem - it is always better to create the database file upon first start of your app, and then save it to the user’s disk. SpecialFolder.ApplicationData.Child(“MyApp Data”)
Hope that helps
Thanks for the quick response. I see the Creator Code.
Regarding the database, it’s used for reference, so I can’t create it on the fly.
What do you mean used for reference? Can you not recreate the database’s contents upon first run, and then simply reference it from their disk? I don’t quite understand why you cannot create it?
You can put the database in Resources and read from it there. But, if you are doing ANY writing to the database you’ll want to copy it from Resources to SpecialFolder.ApplicationData.
The reason you do this is it considered a security breach if you modify the bundle contents of your application while it’s running. So copy the file into ApplicationData and never worry about it again.
This is why I said it makes sense to simply recreate it upon first start. If you know what the contents are when including it - you can just as easily recreate it upon first start, save to disk, and then reference it from there. This will prevent having to reference the resources folder, then copy it to disk, then access it from disk.
Recreating it upon first start would eliminate the middle process of having to access and copy the file.
The database includes reference (look-up) information for the end-user. No data gets written to the database.
Michael - then you have 2 choices:
- Put the database file in the resources folder, and then reference it from there.
- Recreate the database file upon first run, and then reference it from there.
I personally, always create my databases upon first start, (even if only for reference) and then reference it from the user’s disk, but Bob’s offered another solution which is also just as viable.
It’s all down to personal choice
Ahhhh … I did not know you could pop the database into the Resources folder within the package. That’s what I was looking for. I saw some references to setting up a build script and using the Copy File command, but wasn’t sure what they were talking about. I already did this with an iOS app I’ve been playing with. I’ll give it a try once I get “back to the Mac.”
(sucks that my real job uses Windoze)
Ensure you pop the database file into the resources folder BEFORE you wrap it - otherwise the codesigning may freak out
Thanks so much for your help. Now that I’ve successfully built a package (that installs nicely on my wife’s Mac), it’s time to go back into the code and clean things up prior to submission to Apple for evaluation.
I have been bitten by this in the past with a private app (custom app I wrote for a customer of mine), and their security caught me changing the internal database this changing the “bundle”, and the security of it. I learned the hard way.
I strongly suggest that you move/copy/create the database in the SpecialFolders.ApplicationData… area.