Search code examples
iosionic-frameworkionic2ios-app-groupshare-extension

App groups are not working after deployment in release mode


I am working on an ionic iOS application. I have a shared extension in the application, to share information between ionic application and my iOS shared extension I have been using app groups to retrieve the values.

The application works expected when the deployment happens in debug mode. In release mode user defaults does not work from share extension.

I have the distribution certificate with enabled app groups. All the other configuration looks fine.

There is another similar question asked although I did not see any answers for the same.

iOS Share Extension not working after deploy


Solution

  • When ionic app is created the entitlement needs to be added separately, adding entitlement in both main and shared extension app will have to edited in the build settings as well. Under code signing entitlements release need to add the entitlement file location.

    The issue was by default the entitlement file is not provided by ionic when you use the shared extension or app group information sharing.