How to manage Xcode Schemes

Official Apple guide is here
https://developer.apple.com/library/ios/documentation/ToolsLanguages/Conceptual/Xcode_Overview/chapters/RunYourApp.html

Scope

  1. What are schemes?
  2. Correcting Schemes.

What are schemes?

In Xcode schemes are used to modify the way a app is run or tested. You can add actions in form of shell scripts and email actions, before and/or after different phases of app like compilation, run, test, profiling etc. See Fig 1. Additionally you can pass custom arguments to your app, change the environment variables etc. You can explore things yourself by expanding the arrow and clicking on different sections.

How to manage Xcode Schemes

Fig 1

Correcting Schemes

There are times when a scheme gets corrupted due to things like renaming an app or sometimes schemes changes automatically while opening Xcode project. The best thing to correct such errors is to create a new scheme.

  1. Creating a new scheme
  2. Click the Scheme area in toolbar (Adventure iOS in Fig 2).
  3. A menu will open (Fig 3). Click new scheme from the menu.
  4. It will open a window in the middle (Fig 4) with the new scheme name and target. Set the target to AppName and click OK to create it.

Note# Some apps throws error on AppNameTest target which it should not throw as AppNameTest Target is not usable in most of the apps. To remove that error go to edit scheme > build > build and uncheck the Run column under AppNameTest column. (Fig 5)

How to manage Xcode Schemes

Fig 2

How to manage Xcode Schemes

Fig 3

How to manage Xcode Schemes

Fig 4

How to manage Xcode Schemes

Fig 5

Related Posts

Leave a comment

Hey, so you decided to leave a comment! That's great. Just fill in the required fields and hit submit. Note that your comment will need to be reviewed before its published.