Why won't app groups work inside my WatchKit extension? Why won't app groups work inside my WatchKit extension? ios ios

Why won't app groups work inside my WatchKit extension?


I had the similar problem. What I noticed, that my WatchKit Extension and WatchKit App had equal bundle identifiers. I changed bundle id of my WatchKit App. Also I didn't forgot to change NSExtensionAttributes/WKAppBundleIdentifier in the info.plist of Extension to match that id. Now everything works. I hope this will help you!

Shortly: Bundle identifiers of WatchKit App and Extension should be different!


Here is what did the trick for me. Apparently Xcode automatically created a new Entitlements file for the new Extension (probably after I set it up from "Capabilities" but unfortunately the value of the array was missing...

In the app Entitlements:

enter image description here

In the Extension Entitlements the value was missing from the array:

enter image description here

Also it's important to make sure that the group appears in the "Capability" tab for both targets (app and Extension) and that all 3 checkmarks are green, see example:

App Target

enter image description here

Extension Target

enter image description here


Did you try to read the same key from the iPhone app?

I believe the problem is that you didn't activate the App Group entitlement in your WatchKit extension.

  1. Select your WatchKit Extension under your project settings.

  2. Select Capabilities tab under WatchKit Extension and look for App Groups and turn it on.

  3. Select the same App Group identifier your created before (it should appear automatically and just check it).