Skip to content

Instantly share code, notes, and snippets.

@juliengdt
Created November 27, 2020 09:25
Show Gist options
  • Save juliengdt/84e798e3034bd76b14f7f146008768f7 to your computer and use it in GitHub Desktop.
Save juliengdt/84e798e3034bd76b14f7f146008768f7 to your computer and use it in GitHub Desktop.
a brief intro to xcconfig inclusion

XCConfig

  • Le client s'appelle DOE
  • Les environnements possibles sont dev et release

Configuration principale pour le projet:

// project.xcconfig

SWIFT_VERSION = 5.0

NETWORK_LOG = NO
MODULES_LOG = NO

Configuration pour DOE:

configuration client

// doe.xcconfig

#include? "../project.xcconfig"

// client
MARKETING_VERSION = 2.0.1
CURRENT_PROJECT_VERSION = 235
PRODUCT_BUNDLE_IDENTIFIER = com.doe.ios
PRODUCT_NAME = DoeApp

configuration env dev

// dev.doe.xcconfig

#include "doe.xcconfig"

// override
NETWORK_LOG = YES
MODULE_LOG = YES

MARKETING_VERSION = 2.0.1
CURRENT_PROJECT_VERSION = 235
PRODUCT_BUNDLE_IDENTIFIER = $(inherited).dev
PRODUCT_NAME = $(inherited)-DEV


// environment

PROVISIONING_PROFILE_SPECIFIER[config=Debug][sdk=*][arch=*] = cba0308f-...-90a5c
PROVISIONING_PROFILE_SPECIFIER[config=Release][sdk=*][arch=*] = cba0308f-...-90a5c

configuration env release

// release.doe.xcconfig

#include "doe.xcconfig"

// override
MARKETING_VERSION = 2.0.1
CURRENT_PROJECT_VERSION = 235

// environment

PROVISIONING_PROFILE_SPECIFIER[config=Debug][sdk=*][arch=*] = cba0308f-...-90a5c
PROVISIONING_PROFILE_SPECIFIER[config=Release][sdk=*][arch=*] = cba0308f-...-90a5c

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