iOS scheme goes missing when I branch my project (Xcode 4.2)

你离开我真会死。 提交于 2019-12-21 09:12:40

问题


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 and Release in my case). Finally, I chose the Export... 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 of export. And voila 🙂

Hope it helps! Cheers



来源:https://stackoverflow.com/questions/9950259/ios-scheme-goes-missing-when-i-branch-my-project-xcode-4-2

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!