0

Look at this Apple Docs

Additionally, iOS automatically forwards a read-only copy of your iOS app’s preferences to Apple Watch. Your WatchKit extension can read those preferences using an NSUserDefaults object, but it cannot make changes directly to the defaults database.

Is there anyone know how to access iOS app's preferences from Apple Watch and how often it is updated on the Apple Watch.

I did try to search for document, but could not found any.

AFAIK, NSUserDefaults can contain upto much memory. It would be bad if iPhone try to save all this user config in NSUserDefault onto the watch.

Sang
  • 4,049
  • 3
  • 37
  • 47

1 Answers1

-1

They don't. You should use the WatchConnectivity framework. Here is an extended answer: Reading NSUserDefaults in watchOS 2 (I know App Groups doesn't work)

Community
  • 1
  • 1
Jens Peter
  • 715
  • 6
  • 10
  • if they dont, what does this sentence ` iOS automatically forwards a read-only copy of your iOS app’s preferences to Apple Watch` mean? – Sang Feb 18 '17 at 09:40
  • Personally, I think thats an (rare) error in the Apple documentation. It does not seem that anyonw have gotten it to work (including me), and I'm using WatchConnectivity just to excange a few stored properties between my iOS and Watch app. – Jens Peter Feb 20 '17 at 06:00
  • The thing is, since watchOS 2.0, the extension is running on the device, and thus not sharing UserDefaults. In watchOS 1.0, the extension was running on the iOS device, and then it was possible to share the info. – Jens Peter Feb 20 '17 at 06:26