dpa99c / cordova-custom-config

Cordova/Phonegap plugin to update platform configuration files based on preferences and config-file data defined in config.xml
318 stars 84 forks source link

Create a <project_name>.entitlements file possible? #131

Closed TanjaBieber closed 6 years ago

TanjaBieber commented 6 years ago

Hi, is it possible to create or overwrite a .entitlements file for iOS with this plugin? If yes, which entries in the config.xml file do i need? PS: Using version 3.2.0 of this plugin. Working with an VS 15 and a remote compiler for iOS.

dpa99c commented 6 years ago

The plugin will currently enable you to modify (not create) an existing entitlements file.

Specify the filename in a <config-file> block, for example:

<config-file platform="ios" target="Entitlements-Release.plist" parent="aps-environment" mode="replace">
  <string>production</string>
</config-file>

<config-file platform="ios" target="Entitlements-Debug.plist" parent="aps-environment" mode="replace">
  <string>development</string>
</config-file>
dpa99c commented 6 years ago

Note that in a cordova-ios project, Entitlements-Release.plist and Entitlements-Debug.plist should be created by Cordova

TanjaBieber commented 6 years ago

I need to set the com.apple.developer.default-data-protection value in my application to a higher level. As far as I know, this must be set in the .entitlements file and not in the Entitlements-.plist files. So is it possible to set this option with your plugin?

dpa99c commented 6 years ago

You can do it in the Entitlements-*.plist (see here), for example:

<config-file platform="ios" target="Entitlements-Release.plist" parent="com.apple.developer.default-data-protection" mode="add">
    <string>NSFileProtectionComplete</string>
</config-file>
joaoduartemariucio commented 6 years ago

Does this solution still work?