ern-container-transformer-build-config
v1.1.1
Published
[![ci][1]][2]
Downloads
6
Maintainers
Readme
iOS Build Configuration Container Transformer
This transformer can be used to update Build Configuration(s) of a generated iOS Container.
The official iOS Electrode Native Container currently exposes four build configurations:
Project-Debug
(Electrode Container project Debug)Project-Release
(Electrode Container project Release)ElectrodeContainer-Debug
(Electrode Container target Debug)ElectrodeContainer-Release
(Electrode Container target Release)
Each of these build configurations are coming with some build settings that might not play well with your native application upon integration of the Container.
Using this transformer, you can update one or more of these build configurations with your desired build settings.
Inputs
containerPath
: Path to the Container to transformconfigurations
: Array of build configurations to update
For example:
["ElectrodeContainer-Debug"]
settings
: Object containing the settings to add/update to/in the build configuration(s)
For example:
{
"ENABLE_BITCODE": "NO",
"PRODUCT_BUNDLE_IDENTIFIER": "com.mycompany.ElectrodeContainer"
}
Usage
With ern transform-container
CLI command
ern transform-container --containerPath [pathToContainer] -t build-config -e '{"configurations":[...], "settings":{...}}'
Instead of passing the whole configuration on the command line for --extra/-e
, it is also possible to use a file path to a json file holding the configuration, or a path to a file stored in the Cauldron. Check out the ern transform-container command documentation for more info.
The configuration object can also be an array holding multiple objects, such as [{"configurations":[...], "settings":{...}}, {"configurations":[...], "settings":{...}}]
With Cauldron
To automatically transform the Cauldron generated Containers of a target native application and platform, you can add a transformer entry in the Cauldron in the Container generator configuration object as follow :
Electrode Native <= 0.31
"transformers": [
{
"name": "build-config",
"extra": {
"configurations": [],
"settings" : {}
}
}
]
Electrode Native >= 0.32
"pipleline": [
{
"name": "build-config",
"extra": {
"configurations": [],
"settings": {}
}
}
]
The extra object can also be an array holding multiple objects, such as [{"configurations":[...], "settings":{...}}, {"configurations":[...], "settings":{...}}]
Programmatically
import BuildConfigTransformer from 'ern-container-transformer-build-config'
const transformer = new BuildConfigTransformer()
transformer.transform(
{
/* Local file system path to the Container */
containerPath: string
/* Extra data specific to this publisher */
extra?: {
/* Array of build configurations to update */
configurations: string[]
/* Object containing the settings to add/update to/in the build configuration(s) */
settings: object
}
}
})
The extra object can also be an array holding multiple objects, such as
[
{
"configurations": [],
"settings": {}
}, {
"configurations": [],
"settings": {}
}
]