variants icon indicating copy to clipboard operation
variants copied to clipboard

[iOS] Configuration specific signing

Open DanielSumara opened this issue 1 year ago • 0 comments

Background

Currently we can define application signing in variants.yam providing signing properties globally or per variant. Reference to documentation: https://github.com/Backbase/variants/blob/develop/docs/ios/WORKING_WITH_FASTLANE_MATCH.md

In most cases we are configuring variants using Apple Distribution certificate which work great on CI/CD and on simulator. In scenarios where we need to validate some functionalities on physical devices, we are unable to use Distribution certificate as Xcode won't be able to attach debugging process to application (App Sandbox will reject connection).

For such scenarios easiest solution is to enable Xcode Automatically manage signing capability for Debug configuration. Xcode will create expected development profiles and register physical devices if needed.

Executing variants switch --variant overrides changes and setting CODE_SIGN_IDENTITY, CODE_SIGN_STYLE and PROVISIONING_PROFILE_SPECIFIER to values specified in variants.yaml for all configurations (Debug, Release).

Solution

Variants could support configuration specific signing options so we could use different approaches per configuration, eg:

  • Release configuration use Distribution certificate
  • Debug configuration use Xcode automatic signing

DanielSumara avatar Aug 08 '24 14:08 DanielSumara