Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding a build variant and running it on iOS 8

When you create a new iOS project you have 2 build variants, Debug and Release (or at least that's what they are called in Android, Build Variant).

Is it possible to create a another build variant? Let's say, "Staging".

Then, how do I run my app on a different build variant, for example how do I run it in release mode on the emulator/development device?

like image 954
Christopher Francisco Avatar asked May 13 '15 19:05

Christopher Francisco


1 Answers

Yes, here's how.

To add a build configuration

  1. In the menu to the left, select your project.
  2. To the right, you'll see "PROJECT" and "TARGETS". Select your project.
  3. Go to the Info tab and click '+' under Configurations and choose "Duplicate "Debug"/"Release" configuration" and name it whatever you'd like.

enter image description here

To choose which build type to use

  1. Click "NameOfMyProject" next to the device you're building to (upper left of the screen) and choose "Edit scheme".
  2. Choose Run -> Build Configuration -> NameOfYourBuildConfiguration.

Hope it helps.

like image 146
Leverin Avatar answered Oct 20 '22 05:10

Leverin