Skip to content

iOS unable to share configuration between builds #221

Open
@gtbuchanan

Description

I have some configuration that should only be applied to the Release build. However, all other configuration should be shared between the Debug and Release builds. When defining configuration for a specific build, the more generic configuration appears to stop working. For example, this successfully sets the bundle ID:

platforms:
  ios:
    bundleId: com.example.app

This sets the Release-specific settings, but the bundle ID stops being set:

platforms:
  ios:
    bundleId: com.example.app
    targets:
      builds:
        Release:
          buildSettings:
            CODE_SIGN_STYLE: Manual
            CODE_SIGN_IDENTITY: iPhone Distribution
            PROVISIONING_PROFILE_SPECIFIER: My App

I've tried to workaround this problem by using YAML merging:

platforms:
  ios:
    targets:
      builds:
        Debug: &iosDefaults
          bundleId: com.example.app
        Release:
          <<: *iosDefaults
          buildSettings:
            CODE_SIGN_STYLE: Manual
            CODE_SIGN_IDENTITY: iPhone Distribution
            PROVISIONING_PROFILE_SPECIFIER: My App

but that results in a warning and the Release configuration not being applied:

run ios <<
[warn] Unsupported configuration option ios.<<. Skipping

Is this a bug? Is there a way to achieve this without duplicating the configuration?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions