Add IOS capability programmatically in Cordova plugin Add IOS capability programmatically in Cordova plugin xcode xcode

Add IOS capability programmatically in Cordova plugin


Add the following to the plugin.xml file then remove and reinstall the plugin. The capability will still need to be added to the provisioning profile(s), but Xcode should resolve that automatically if you build using the GUI or use the -allowProvisioningUpdates flag with cordova build ios/xcodebuild.

<platform name="ios">    <config-file target="*.entitlements"            parent="com.apple.security.application-groups">            <array><string>group.com.example</string></array>    </config-file>    <config-file target="**/Entitlements-Debug.plist"            parent="com.apple.security.application-groups">            <array><string>group.com.example</string></array>    </config-file>    <config-file target="**/Entitlements-Release.plist"            parent="com.apple.security.application-groups">            <array><string>group.com.example</string></array>    </config-file></platform>