Need to install a folder in Application Support

I’ve discovered in El Capitan that I can no longer have my spellcheck dictionary (using MagicSpeller from Infiniteline) in the same folder as my app. Seems like I need to move it into the Application Support/MyApp folder. Not sure how to do this. I was using Packages to create the installer but can’t see a way in there to move the spellcheck folder into the Application Support. Should I do this in the app somehow? The spellcheck folder is 5 text files that are maybe 5mb in size each. Should I just drag the folder into my xojo project and write it from there somehow? Thanks.

Use a copy files step in the ide to copy the dictionaries to Resources when building. Then in your app start up routine check to see if they exist in app support, if not copy them from resources to app support.

You should use the postinstall Package script to create the folder and copy the files into the folder.

The word for today - Draconian. As in - “Apple’s new El Capitan SIP requirements are “draconian” in the way they lock out sections of the OS from application and user access.”

I just noticed that my How To Use PDF doc is still accessible in El Capitan. It’s in the Resources folder of the compiled app. Maybe I should just move the link there.

f = App.ExecutableFile.Parent.Parent.Child("Resources").child("Spellcheck Dictionary").child("MagicSpeller English dict")

I’ll give that a shot and see if that works. I understand you can turn off SIP, but I think you have to do it on startup or something. Not something I want users to have to do. My app is all about ease of use.

It turns out that I didn’t need to move it at all. The Spellcheck folder had a red minus sign on it and that’s why the app couldn’t access it. I needed to select that folder, go to Get Info, and specifically set my user name to have read/write permission to it. While that’s good I don’t need to move the folder, it’s still bad if users need to go to this trouble to access a folder that is installed by the app. BTW, moving the folder into Resources didn’t work for some reason either. At least I know what the problem/fix is for now.

Why do you need to use Magic Speller in your Mac builds anyway? I used to use it for all my builds, but dropped it from the Mac builds a few releases ago. Who’s going to select Check Spelling for a text field when the Mac has built in spell checking?

I would still copy it to the Applications Support folder anyway. Firstly, in case you want to submit your app to the MAS you cannot access any database (even read only) from within the app itself. Secondly, if the app is ever updated or deleted you don’t want to delete any user-created data (e.g. words added to the dictionary).

Another reason for moving the dictionary to Application Support: if the dictionary is in app the user can’t add any word. Changing the app is not allowed on the Mac.

I am dealing with this right now. Am I understanding corectly that not only should I copy the database file to Application Support the first time the app runs, I also need to create the folder Application Support/Myapp and copy the database there?

And then I need to write a slew of method that check to see that the Myapp folder exists on Application Support (if not, then make it and copy the db there) and then (if the folder is there) checks to see if the database file is there and if not, copies it. Right?

What about prompting the user to look for the database? Maybe they accidentally put it in the trash with their changes to it, and they should be given the chance to restore it, before just making a new copy of it?

Is this a common thing? (Before I reinvent the wheel.)

Any best practices? What if the user messes with the Application Support folders/contents while using the app?

[quote]should I copy the database file to Application Support the first time the app runs, I also need to create the folder Application Support/Myapp and copy the database there?

And then I need to write a slew of method that check to see that the Myapp folder exists on Application Support (if not, then make it and copy the db there) and then (if the folder is there) checks to see if the database file is there and if not, copies it. Right?[/quote]

Thats right.
If the user deletes the db, your app will create a new one.
I have to say that the Application Support folders arent easy for a user to find or amend , especially under Windows (presumably by design)