Signing configuration that should be used when building for the device.
The signing
is a nested section within the xcodebuild
parameters. e.g:
xcodebuild {
target = "Example"
scheme = "Example"
signing {
certificateURI = 'file:///Users/me/codesign/development.p12'
certificatePassword = 'my_secret_password'
mobileProvisionURI = [
file:///Users/me/codesign/com.example.Example.mobileprovision',
file:///Users/me/codesign/com.example.Example.Widget.mobileprovision'
]
}
}
URI where the mobile provision profile is located that should be used when signing the app. You can also specify multiple provisining profiles as array when you have an app exenstion e.g.
[ 'file:///first.mobileprovision', 'file:///second.mobileprovision']
default value: empty
Uri to the certificate that should be used to sign the app
default value: empty
Password for the certificate file
default value: empty
Here the entitlements settings can be specifed that should be merged with the settings from the provisioning profile. The value can be specified as map. The values specified here overrides the values from the provisioning profile. Here is an example:
entitlements = [
"com.apple.security.application-groups": [
"group.com.example.MyApp"
]
]
since 0.15.1: If you want to delete a value from the entitlements than you can set it to null and it will be deleted: e.g.
entitlements = [
'com.apple.developer.icloud-container-environment' : null
]
If the parameter is empty, then the build process looks for an entitlements that is embedded in the archive (*.xcent file) and uses this for merging the the entitlements from the provisioning profile.
default value: empty
(since 0.14.6)
Replaces the entitlements
setting. If this parameter is used, then the entitlments
is ignored.
The bundleEntitlements
is used to manipulate the entitlement for the app and also for the app extension.
You specify a map where the the key is the bundle identifier and the values is a map with the entitlement settings you
want to change.
Example.
bundleEntitlements = [
"com.example.App": [
"com.apple.security.application-groups": [
"group.com.example.MyApp"
]
],
"com.example.App.Extenstion": [
"com.apple.security.application-groups": [
"group.com.example.MyApp"
]
],
]
If you want to delete a value from the entitlements than you can set it to null and it will be deleted: e.g.
bundleEntitlements = [
"com.example.App": [
"com.apple.security.application-groups": null
],
]
(since 0.24.6)
With this parameter a entitlements file can be specified that is used for codesigning. If you specify a file here only this settings are used and nothing is merged, that means that the entitlements
parameter from above is ignored.
If empty then the entitlements that is embedded in the provisioning file is extracted and used.
default value: empty
The signing identity e.g. 'iPhone Developer: Rene Piringer (AASDF1234)' or the SHA. With macOS Sierra only the SHA works. This parameter is optional and only needed if you have more then one identity in the keychain. This is only the case if the keychain parameter is set, and the keychain is not created during the build process.
default value: empty
Password for the chain that is created
default value: 'This_is_the_default_keychain_password'
It is highly recommended that you do not use this parameters! Gradle creates a keychain automatically, therefor you do not need to specify the keychain. You only need the parameter if you want to use an existing keychain. For this you have to make sure that /usr/bin/codesign
is allowed to access the certificates in this keychain. If you use this parameter then the parameters certificateURI
and certificatePassword
are ignored and nothing is imported!
A custom timeout in seconds before the keychain automatically locks.
default value: empty - This means the default timeout is used that is 5 minutes