Can't get settings bundle to work

Hi,


I'm trying to add a settings bundle to my WatchApp. I've create a bundle and it is displayed on the iPhone in the Apple Watch App as expected.

But I can't get any value from NSUserDefaults.

But I'm afraid I don't know how it is supposed to work with iOS9 and WatchOS 2.0. When the WatchKit Extension was located inside the containig iOS App and running on the phone it made sense by using an App Group.

But I can't find any documentation about how settings are now transferd to the Watch to be accessible by the WatchKit Extension which now runs on the watch rather the phone.


Any hints?


Dirk

Replies

No one?

Sill no one? Did I miss some documentation where this is explained? I mean there must be a way, otherwise the settings bundle would be completely useless.


Dirk

Hm, My last reply doesn't seem to have posted...


Hopefully this is the documentation you're looking for:

https://developer.apple.com/library/prerelease/watchos/documentation/General/Conceptual/WatchKitProgrammingGuide/Settings.html

The documentation hasn't been updated for watchOS 2 yet.

Please have a look at my answer in this other thread: https://forums.developer.apple.com/message/30091#36180

Yes it has - it explicitly says so if you click on the revision date at the bottom of the page.

Hi Max108,


this is the documentation I'm aware of, but it just doesn't work. I used to work with WatchOS1, but it does not work with WatchOS2.

I was hoping there's some doucmentation telling how to handle this in particular with WatchOS2.


Dirk

Hi Fabian,


I've read your anwser in the other thread but I can't believe (no, I don't want to believe) that this is the intendet way to handle settings in WatchOS2.


Dirk

Hi Dirk,


Apple clearly think they've updated the documentation to reflect changes in watchOS 2 so, given that it doesn't work, they might need some prompting to revisit it.


My basis for saying that they think they've updated it already is that that, if you click on the revision date at the bottom of the page (Updated: 2015-07-08) we are told:

Contains bug fixes and additions for watchOS 2.


-Max

I do it in a similar way for my application. I store these settings in the ApplicationContext among other things. I do understand you Dirk, as I also don't like it. But for now it's all I really got. Would love to have a more direct approach though.

I have the same issue on this thread


Some people are saying they can do it with just the app group, I have been trying all day erryday and still cannot get it to work.