|
| 1 | +## iOS Signing |
| 2 | + |
| 3 | +Variants allows you to highly customize the signing for each variant and each type of signing (debug vs release). Internally, every variant will always have a debug signing and a release signing that are selected using the following priority order: |
| 4 | + |
| 5 | +`release_signing` (from variant configuration) > `signing` (from variant configuration) > `signing` (from global configuration) |
| 6 | + |
| 7 | +The same priority applies to the debug signing |
| 8 | + |
| 9 | +`debug_signing` (from variant configuration) > `signing` (from variant configuration) > `signing` (from global configuration) |
| 10 | + |
| 11 | +If no signing configuration is found, an error is thrown to the user so the `variants.yml` must be updated. |
| 12 | + |
| 13 | +### Configuration example |
| 14 | + |
| 15 | +Given the following `variants.yml`: |
| 16 | + |
| 17 | +```yaml |
| 18 | +ios: |
| 19 | + xcodeproj: SampleProject.xcodeproj |
| 20 | + target: |
| 21 | + ... |
| 22 | + extensions: |
| 23 | + - name: TestWidgetExtension |
| 24 | + bundle_suffix: TestWidgetExtension |
| 25 | + signed: true |
| 26 | + variants: |
| 27 | + default: |
| 28 | + ... # does not include a signing, debug_signing, or release_signing |
| 29 | + beta: |
| 30 | + signing: |
| 31 | + match_url: "[email protected]:sample/match.git" |
| 32 | + team_name: "Beta Backbase B.V." |
| 33 | + team_id: "DEF7654321D" |
| 34 | + export_method: "appstore" |
| 35 | + staging: |
| 36 | + signing: |
| 37 | + match_url: "[email protected]:sample/match.git" |
| 38 | + team_name: "Staging Backbase B.V." |
| 39 | + team_id: "ABD1234567D" |
| 40 | + export_method: "appstore" |
| 41 | + debug_signing: |
| 42 | + style: automatic |
| 43 | + prod: |
| 44 | + release_signing: |
| 45 | + match_url: "[email protected]:sample/match.git" |
| 46 | + team_name: "Prod Backbase B.V." |
| 47 | + team_id: "GHI8765432D" |
| 48 | + export_method: "appstore" |
| 49 | + debug_signing: |
| 50 | + style: automatic |
| 51 | + signing: |
| 52 | + match_url: "[email protected]:sample/match.git" |
| 53 | + team_name: "Backbase B.V." |
| 54 | + team_id: "ABC1234567D" |
| 55 | + export_method: "appstore" |
| 56 | +``` |
| 57 | +
|
| 58 | +This is the output in Xcode and Matchfile: |
| 59 | +
|
| 60 | +- For the `default` variant, both the release signing and debug signing will come from the global signing configuration. |
| 61 | +- For the `beta` variant, both the release signing and debug signing are overwritten by the local variant configuration. |
| 62 | +- For the `staging` variant, both the release signing and debug signing are overwritten, but in this case, the debug signing is overwritten by the `debug_signing` configuration and the release signing is overwritten by the `signing` configuration |
| 63 | +- For the `prod` variant, both the release signing and debug signing are overwritten, but in this case, the debug signing is overwritten by the `debug_signing` configuration and the release signing is overwritten by the `release_signing` configuration |
| 64 | + |
| 65 | +### Target extension signing |
| 66 | + |
| 67 | +The signing will also affect the sign of the target extensions listed in the `extensions` configuration that are marked with `signed` as `true`. They will follow the same rules as the main app as mentioned above. |
| 68 | + |
| 69 | +Extensions will inherit the signing configuration from the respective (debug / release) signing configuration of the current selected variant. |
0 commit comments