Official Apple guide is here
- What are schemes?
- 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.
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.
- Creating a new scheme
- Click the Scheme area in toolbar (Adventure iOS in Fig 2).
- A menu will open (Fig 3). Click new scheme from the menu.
- 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)