3 Replies Latest reply on Aug 4, 2009 8:44 AM by Brandon Ellis

    where do files install to on mac

    puppetman

      I am using  an air application on a mac that uses a sql db file. I am not so familer with where files install to on a a mac application and where specifically I would find the db file being used in this air application. On a pc installation of the same application I find the file(s) in the folder created for the application in the programs folder. Where on a mac do you find the associated application files for an installed air application?

       

      thanks for any help on this.

        • 1. Re: where do files install to on mac
          Brandon Ellis Level 1

          Hi, mac stores the application here:

          /Applications/YOUR_AIR_APP or /Users/YOUR_USERNAME/Applications/YOUR_AIR_APP

           

          if you bring up the context menu you need to click on 'Show Package Contents' this will get you to the associated files.

           

          if you are looking for the database being used you need to look under /Users/YOUR_USERNAME/Library/Preferences and look for the application. Usually something like com.AppMaker.YourCoolAIRApp. The database has to be moved their since (for security reasons) the database stored in the application resource directory is read only.

           

          Hope that helps

          1 person found this helpful
          • 2. Re: where do files install to on mac
            puppetman Level 1

            Thanks for the suggestions. The context menu to package contents of the app showed me what I was looking for but the db file in there seems to be what is getting written to and I do not see any sign of the db file in preferences that would be named as you described. The db file in the package contents gets a modified time/date that corresponds to the questions in the app that are getting answered which is what the db file is tracking. Basically I am looking for the db file so I can backup and save before reinstalling the app so as to save accumulated data. The database works up to some point then starts getting missplaced answers and some eroneous undefined elements. You say the db file in the application package should be a read only file? Do you think if this is the one getting written to, that this could be part of my problem? Should something be getting installed to the preferences folder that is not getting installed?

             

            Thanks

            • 3. Re: where do files install to on mac
              Brandon Ellis Level 1

              Hmm somewhere they changed it back so you could write to the db inside the application storage directory.

              Personally, I still think it's a best practice to copy the db to the users local storage dir on first run. It makes it a lot easier to deal with if the users data gets munged or curious users *remove* the db (it happens) or if a db schema change is necessary.

               

              As far as your issue with data corruption, SQLite Manager is a GREAT query analyzer for Sqlite. It's available as a Firefox addon. It makes it very easy to see what's going on with the db. The downside of Sqlite is that while it says it accepts strongly typed data, it pretty much breaks everything down to a string or a number. This meaning you can insert a date into Sqlite as a DATETIME value but try using it as a date once it comes back out.

               

              Good luck

              hope this was helpful to you.

               

              Brandon Ellis

              Adobe Certified Professional Flex 3 and AIR