I am creating a program that will be submitted to AppStore to be distributed on Mac OS. The application needs to store several user settings in an xml file on file system.
I am using Xamarin.Mac (aka Monomac) platform to create a program.
Where is my app supposed to save application User-specific data on filesystem?
Perhaps, Xamarin.Mac already has some classes to provide developer with an encapsulated way to access these.
You can find app preferences in $HOME/Library/Preferences folder.
Related
I'm developing a Windows Universal App, I need to share a database for all the users' account existing on pc.
Is it possible? What's the best solution?
Thanks
In Universal Apps the app data is stored in an app data store. When an app is installed, the system gives it its own per-user data stores for settings and files. So what you are asking is not possible using the native app data APIs.
Also note:
The system preserves the contents of these data stores when the user
installs an update to your app and removes the contents of these data
stores completely and cleanly when your app is uninstalled.
Source: Store and retrieve settings and other app data
I came across the term "IsolatedStorage" in windows phone. Can anybody explain it in detail how is it related to windows phone applications? Also how does it affect while application version upgrade?
Isolated Storage refers the private read / write directories that each app has for storing their own data. It is isolated from all other apps on the system. When an app is upgraded via the store on an end-user's machine, the isolated storage is preserved.
Note that during development, Isolated Storage of an app can be deleted if you do a full rebuild of the project.
IsolatedStorage is a way of allowing apps to save files locally to the application within a device. Until the app is uninstalled, the IsolatedStorage for the application is persisted. If the user upgrades the app in the store, as long as there isn't a change in the way the IsolatedStorage is implemented, it will also be preserved during the update.
when deploying software on Windows, it is relatively easy to update files in a program folder by running a setup program (e.g. generated with NSIS) with admin rights. Is there an analogous way on Mac? Is it possible to exchange files in an installed app bundle and how is it done?
Thanks!
If it's an app distributed via the App Store or signed (or both), you can not replace files within an application bundle without breaking it (where it won't launch on subsequent attempts).
You didn't provide enough information in your question to explain what you are trying to do. Is this for an application you are writing or is this for applications with site licenses or apps you don't control at all?
If this is for an application you are writing, Apple recommends installing resources in ~/Library/Application Support/ or ~/Library/Cache/ or other directories, and then -- in most cases -- you'd have to create some mechanism within your app to fetch and save updated resources. There may be some stuff that the MacOS provides, like NSCache.
I'm new to building application on Mac. I have global data that I need to share between users and not sure where to store this data on Mac to avoid permissions issues when reading and writing files.
On Windows I have stored it in /ProgramData/ in the past.
Changeable goes in /Library/Application Support/application-name however note you will need to ask for an admin username and password.
If the data is never change or only at install then it can be held inside the Application bundle.
Read all about this in the Apple docs
To provide application updates in Windows, we can simply download the installer and run it. Applications are installed in %PROGRAMFILES% and shortcuts are placed in various places. Keys and values are added to the registry to provide an entry in the system's Programs list.
To provide application updates in Linux, we can use the system's package manager.
How do you provide application updates in Mac OS X? I think in general you simply drag .app bundles to /Applications? Does the system provide any sort of registry other than "look in /Applications folder"? Should the general flow of updating simply involve downloading an opening a DMG file, prompting the user to drag the new application bundle into /Applications? Will copying an app bundle to a folder delete the existing bundle before copying, or does it act like a normal folder (e.g. add and replace existing files)? I'd just like some general information on how I know go about implementing a 'check for updates' feature consistent with what's expected for a Mac OS X application.
It sounds like you should look into Sparkle.
In my experience as a Mac user (not a Cocoa dev), it's become the de facto standard for self-updating apps, save for a few monoliths like Microsoft Office and Adobe CS.