问题
In Xcode 4.2 when I create a new branch and open it, the iOS scheme which exists in the Master is lost. Instead I have a scheme for 'Mac 64 bit."
This has happened a few times in a row and I handle it by creating a new scheme, deleting the 'Mac 64 bit' one and then renaming the new scheme to what the original was. I'd rather fix whatever is wrong though. Did I set something up wrong - some preference somewhere?
回答1:
I know this is old question but there doesn't seem to be a good question lately either. So, I am adding my solution for this.
The issue is because the scheme is not checked into other branch. If they are not, scheme will disappear on others.
If you wonder why this was not checked in, scheme is local unless you 'Check to Share' box in Manage Scheme and source controlled to git.
After it is saved in a branch, to make this change visible in other branches, you need to propagate this to the rest of working branches.
I did this using git command line because doing this xcode isn't so reliable because it is under .xcodeproj.
回答2:
I ran into the same issue and this is how I fixed it:
- From my master branch, I exported the schemes I needed - I did by navigating to
Product > Scheme > Manage Schemes...
on the Xcode menu. I then selected the schemes I wanted to export (i.e.Development
andRelease
in my case). Finally, I chose theExport...
option after clicking on the gear icon as shown in the picture below.
- Then I switched to my branch and followed the same steps as before but choosing
import
instead ofexport
. And voila 🙂
Hope it helps! Cheers
来源:https://stackoverflow.com/questions/9950259/ios-scheme-goes-missing-when-i-branch-my-project-xcode-4-2