I am working on my app to get ready for Apple Watch. I use Parse in my app, and instead of allowing user to try and login with their watch, I just want it to use the PFUser
data from the iPhone. If they're logged in, it detects the PFUser
the iPhone is currently using, if not, it prompts them to log in on the iPhone. My question is, what is the best way to handle passing of data for this? NSUserDefaults
or App Groups
?
Asked
Active
Viewed 128 times
0

user717452
- 33
- 14
- 73
- 149
1 Answers
0
I think you need enable the app group, and then you can access NSUserDefaults from app group. you can use
let sharedUserDefaults = NSUserDefaults(suiteName:"<group identifier>")
replace "<group identifier>"
to your app group identifier, you can find it in your apple develop Identifiers link. Then you can use the "sharedUserDefaults" to set or get anything you want use.

Perry Chen
- 50
- 4