• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
App's r/w access to /Library/Preferences/OurAppPrefsFolder, using Xcode 3.2.6
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

App's r/w access to /Library/Preferences/OurAppPrefsFolder, using Xcode 3.2.6


  • Subject: App's r/w access to /Library/Preferences/OurAppPrefsFolder, using Xcode 3.2.6
  • From: Jim Prouty <email@hidden>
  • Date: Mon, 01 Jul 2013 18:29:00 -0700

We allow our Macintosh application to share some preferences among all users on a computer, and our app reads and writes those setting to files and folders within one of two places:

	/Library/Preferences/OurAppPrefsFolder

	or

	/Users/<username>/Library/Preferences/OurAppPrefsFolder

Mac OS X 10.8 refuses to let us read or write within the shared preferences folder (/Library/Preferences/OurAppPrefsFolder).

We want to restore this capability to our users.

Our app is not sandboxed currently, but the com.apple.security.temporary-exception.shared-preference.read-write key seems to be the solution.

After scanning "App Sandbox Design Guide"

	http://developer.apple.com/library/mac/#documentation/Security/Conceptual/AppSandboxDesignGuide/AppSandboxInDepth/AppSandboxInDepth.html#//apple_ref/doc/uid/TP40011183-CH3-SW8

and reading "Aperture 3.4, Sandboxing, and FlickrExport":

	http://mjtsai.com/blog/2012/09/23/aperture-3-4-sandboxing-and-flickrexport/

And using our somewhat aged XCode 3.2.6 (don't laugh!) to add keys to our Info.plist:

<key>com.apple.security.app-sandbox</key>
    <true/>

<key>com.apple.security.temporary-exception.shared-preference.read-write</key>
<array>
	<string>WaveMetrics/</string>
</array>

The ability is unchanged.

Our app is codesigned, but apparently lacks entitlements I thought I'd added:

$ codesign -dvvvv --entitlements - /Source/Igor\ 6\ Xcode\ Folder/Igor\ Pro.app
Executable=/Source/Igor 6 Xcode Folder/Igor Pro.app/Contents/MacOS/Igor Pro
Identifier=com.wavemetrics.igorpromach
Format=bundle with Mach-O thin (i386)
CodeDirectory v=20100 size=166276 flags=0x0(none) hashes=8307+3 location=embedded
CDHash=b666bb1735285aa8ade994b9baedba47a5169c9b
Signature size=4228
Authority=Developer ID Application: WaveMetrics, Inc.
Authority=Developer ID Certification Authority
Authority=Apple Root CA
Signed Time=Jul 1, 2013 6:11:49 PM
Info.plist entries=25
Sealed Resources rules=4 files=19
Internal requirements count=1 size=188
Jims-Shiny-New-Mac-Pro:~ jim$

Obviously I'm missing something here...

--Jim

========================================================================

Jim "How does it work?" Prouty

Voice: (503) 620-3001, FAX: (503) 620-6754
Makers of IGOR Pro, scientific data analysis and graphing for Mac and PC
http://www.wavemetrics.com


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: App's r/w access to /Library/Preferences/OurAppPrefsFolder, using Xcode 3.2.6
      • From: Scott Ribe <email@hidden>
  • Prev by Date: Re: Xcode, Privacy, and Access Contacts
  • Next by Date: Core Data Mapping Model: New attributes missing in Editor
  • Previous by thread: Re: Xcode, Privacy, and Access Contacts
  • Next by thread: Re: App's r/w access to /Library/Preferences/OurAppPrefsFolder, using Xcode 3.2.6
  • Index(es):
    • Date
    • Thread