App Store data storage issue

I’m wondering if anyone can clarify something for me. I have recently added a couple of apps in the App Store and, in order to support updates for existing customers, I still upgrade the non-App Store versions of the apps available from my website. This allows existing customers to download the latest versions without having to re-purchase them from the Mac App Store.

The problem is that users who create data with a trial version or a registered version of a downloaded non-App Store program will loose that data if they purchase an App Store version of the program. This is due to the fact that App Store applications store their data in a container version of the Application Support folder whereas non-App Store application store their data in the regular Application Support folder.

Using “SpecialFolder:ApplicationData” in an App Store program accesses the Macintosh HD:Users:UserName:Library:Containers:com.ttpsoftware.fontsleuth:Data:Library:Application Support folder while using “SpecialFolder:ApplicationData” in a non-App Store accesses the Macintosh HD:Users:UserName:Library:Application Support folder.

So users who upgrade to an App Store version of a program from a non-App Store version lose any data they created in the non-App Store version.

I hope this makes sense. My question is how can I make the non-App Store data available to an App Store version of the program? I have thought of making a program that copies the data from the normal Application Support folder to the container Application Support folder and making this available via download but this seems a bit cumbersome. Is there a better solution?

If you sell the sandboxed version of your app on your web site, it will use the container data folder. If you sandbox the trial version, same thing.

Another approach may be necessary because you have people using the older versions anyway. Modify slightly the App Store version so it checks upon open if exist the data files in Macintosh HD:Users:UserName:Library:Application Support, as well as in HD:Users:UserName:Library:Containers:com.ttpsoftware.fontsleuth:Data:Library:Application Support.

  • If there is a file in the non-container place, load it and save in the container : first time run of the app store app.
    -If there is a file in the container place, then the app has been used already, so the data is now in the container place. Forget the non-container.

Then you must discourage users from mixing versions, because from now on they must use the App Store version. I would simply pop a msgbox saying ‘Your data has been transfered to this app. Please discontinue use of any previous version’ or something like that.

I don’t know if I am clear enough but I believe this approach probably does not require too much hassle and would work fine.

Apple feature migration for updating from non-Sandboxed apps to Sandboxed apps. Search the forums as it’s been mentioned before. If you use App Wrapper, there is a migration tab that you can use to setup migration.

Thanks Michel for the helpful suggestions.

Sam, you may remember me bugging you with questions about App Wrapper Mini. I think the migration feature may be the final justification I need to spring for App Wrapper.

Hi Terrance,
I posted a workaround so you can use migration with App Wrapper Mini, to the following thread.
https://forum.xojo.com/4179-applicationdata-location

Did you try it for the other issue you were having?

Make your next update on your website a sandboxed version and use AppWrapper to migrate data.

Thanks guys. This sandboxing thing is starting to make sense!

Sam, I just purchased App Wrapper. Thanks for all you help.

You’re welcome - let me know if you have any questions.