0

I am trying to pass data from my iPhone app to my Apple Watch app. I already have a working today extension widget (not sure if that requires app groups) but I cannot get the Apple Watch to read NSUserDefaults.

SET

let defaults:NSUserDefaults = NSUserDefaults(suiteName: "group.com.mySuite")

defaults.setObject(dates, forKey: "allDates")

RETRIEVE

var theDates = defaults.arrayForKey("allDates")

Nothing is crashing, but the NSUserDefaults call returns nil. Any suggestions?

Matt Butler
  • 476
  • 6
  • 21

1 Answers1

0

WatchOS 2 requires a different method of transferring data between the iPhone and the Apple Watch.

See it here

Community
  • 1
  • 1
Matt Butler
  • 476
  • 6
  • 21