Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Apache cordova / phonegap how to enable capabilities from config.xml

Tags:

xcode

ios

cordova

I have an application that uses some ios capabilities (Keychain sharing, Push notifications, etc)

Every time that it remove the platforms and re-run cordova platform add ios, I have to manually open the XCode and open the settings .xcodeproj and go to the Capabilities tab and enable them manually.

Is there any way to auto enable them automatically every time that I re-run cordova platform add ios?

Thanks

like image 336
Felix Carmona Avatar asked Jan 05 '17 18:01

Felix Carmona


1 Answers

You may not need to do this at all.

Features you mentioned (Keychain sharing, Push notifications) will work without manually enabling the associated capabilities in XCode if the plugins you use add the required entitlements on install.

And most well-developed plugins do just that. For example:

Simply make sure you're using a recent-enough version of the plugin in question.

like image 117
Jonas Masalskis Avatar answered Nov 14 '22 05:11

Jonas Masalskis