In iOS do we have something like Gradle Build Flavors on Android

You can make use of Schemes and Build configurations in Xcode. Here’s the official documentation: https://developer.apple.com/library/ios/recipes/xcode_help-project_editor/Articles/BasingBuildConfigurationsonConfigurationFiles.html

After you create a build configuration, you should edit your scheme to use that build configuration. For that click on your scheme and select Edit Scheme.

enter image description here

In short, the process is:

  1. Create a build configuration
  2. Set some custom flags for that configuration. For this, go to your target, select Build Settings tab, and search for Preprocessor Macros. There you’ll be able to add custom flags

enter image description here

  1. Edit your scheme, or create a new scheme, to use your build configuration.
  2. In your code, you’ll have to ask if the flag is available using preprocessor macros:


#ifdef APP_STORE
//do something
#endif

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)