如何从 xcode 项目中删除不需要的框架
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/23465879/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to remove unwanted frameworks from xcode project
提问by pooja_1205
I have some unused frameworks in my xcode project.I want to remove those frameworks from the project. I tried deleting the framework but that deletes the framework from the entire xcode.Can anyone please tell me how to remove the framework only from the project not not the entire xcode
我的 xcode 项目中有一些未使用的框架。我想从项目中删除这些框架。我尝试删除框架,但这会从整个 xcode 中删除框架。谁能告诉我如何仅从项目中删除框架而不是整个 xcode
回答by Michael Dautermann
Simply select the framework you want to delete in your list of frameworks in your Xcode project (which you see I've done on the left side of my Test project) and you should see this dialog when you click the "delete" key:
只需在 Xcode 项目的框架列表中选择要删除的框架(您会在我的测试项目左侧看到我已经完成的操作),当您单击“删除”键时,您应该会看到此对话框:
Just click the remove referencebutton.
只需单击删除引用按钮。
Do NOTclick the "Move To Trash" button, or else you'll get the nasty surprise of losing frameworks out of your installed copy of Xcode.
千万不要点击“移动到回收站”按钮,否则你会得到失去框架出你安装的Xcode副本的讨厌的惊喜。
回答by Deep Gami
In your Project
在您的项目中
1) Go to Build phases.
1) 进入构建阶段。
2)Link Binary with libraries.
2)将二进制文件与库链接。
3)select your framework that you want to remove and press minus button down there.
3)选择您要删除的框架,然后按下那里的减号按钮。
回答by cenkarioz
- Go to your
Podfile
in your project and remove the pod you wish (e.g. Alamofire) - Go to project folder in Terminal. Enter
pod install
in the prompt.
- 转到您
Podfile
的项目中并删除您想要的 pod(例如 Alamofire) - 转到终端中的项目文件夹。
pod install
在提示中输入。
It will remove frameworks which exist in your Project, but not in your Podfile.
它将删除存在于您的项目中的框架,但不存在于您的 Podfile 中。