In Xcode how do I create a new workspace and add 1 project to it so that I can see the project and its files?

前端 未结 5 726
南笙
南笙 2021-02-02 06:06

In Xcode how do I create a new workspace and add 1 project to it so that I can see the project and its files?

If I just drag in the project, all I can see is the project

相关标签:
5条回答
  • 2021-02-02 06:19

    Just FYI, 2020, Apple recently added a thing,

    1. make your workspace, exit it and

    2. make your new project. in fact when you enter the name to save the project,

    they added this option:

    just select the workspace you wish to add it to.

    0 讨论(0)
  • 2021-02-02 06:30

    First choose file > new > Workspace...

    Then, you must first, and this is important, you must first close the project that you want to drag in. Than drag in the .xcodeproj file from the finder to your new workspace. Then it will appear properly and expand to show all of its files and your schemes will be available.

    0 讨论(0)
  • 2021-02-02 06:33

    As alternative

    - Close a project that you are going to add to a workspace
    - Open Project Navigator -> Right click -> Add Files to "<workspace_name>"...
    
    0 讨论(0)
  • 2021-02-02 06:37

    Although the accepted answer is correct, there is an alternate way to accomplish the same thing, and it is arguably easier/more straightforward. You can just open up the project in Xcode and click File -> Save as Workspace...

    Bam! You now have a workspace with 1 project in it, as requested.

    0 讨论(0)
  • 2021-02-02 06:37

    Besides the above solutions you can use this alternative. Let's say you have a workspace and a project that want to add to that workspace.

    First close your project. Then open your workspace, Option + Click in the Project navigator. Make sure you are clicking on an empty area, not on the existing files. Then select "Add files to your workspace...". Finally select your project xcodeproj file on you disk.

    0 讨论(0)
提交回复
热议问题