简体   繁体   English

cocoapods 不生成工作区

[英]cocoapods don't generate workspace

I'm quite New to ios and cocoapods.我对 ios 和 cocoapods 很陌生。 I am using realm.io swift version.我正在使用realm.io swift 版本。 Everything is latest version including xcode, realm and cocoapods一切都是最新版本,包括 xcode、realm 和 cocoapods

I did it with dynamic linking and realised itunes don't accept the strips framework.sh ...so I try using cocoapods.我用动态链接做到了,并意识到iTunes不接受strips framework.sh ...所以我尝试使用cocoapods。 I didn't remove the dynamic linking and followed the steps using cocoapods to install realm.我没有删除动态链接并按照使用 cocoapods 安装领域的步骤进行操作。

It generated the workspace file for me and the running keeps telling realm object can't be found though I have import realm.它为我生成了工作区文件,尽管我有导入领域,但运行不断告诉我找不到领域对象。

So I decided to remove the previous dynamic linking and install cocoapods to start all over again.所以我决定去掉之前的动态链接,安装cocoapods重新开始。

Now cocoapods don't generate workspace for me.even a new project that I created.现在 cocoapods 不会为我生成工作区。即使是我创建的新项目。

I tried all the comments to remove pod, cocoapod and even clone the cocoapods etc but nothing works我尝试了所有评论来删除 pod、cocoapod 甚至克隆 cocoapods 等,但没有任何效果

Please help.请帮忙。 Why it don't generate workspace for me anymore为什么它不再为我生成工作区

I followed these steps but still don't work https://teamtreehouse.com/forum/pod-install-error-in-terminal-not-creating-xcode-workspace我遵循了这些步骤,但仍然不起作用https://teamtreehouse.com/forum/pod-install-error-in-terminal-not-creating-xcode-workspace

Just copying from the comments: the answer was to specify use_frameworks!只是从评论中复制:答案是指定use_frameworks! to the test target.到测试目标。

I was getting an Abort:6 error during the Generating Pods project step of pod install.我在 pod install 的Generating Pods 项目步骤中收到Abort:6错误。

I deleted the Pods folder, reinstalled Cocoapods, ran pod install again, and it worked.我删除了 Pods 文件夹,重新安装了 Cocoapods,再次运行pod install ,它工作正常。

Reinstall cocoapods:重新安装 cocoapods:

sudo gem uninstall cocoapods
sudo gem install cocoapods

I used all of the given solution and get success.我使用了所有给定的解决方案并获得了成功。

First got to Product->Scheme->ManageScheme and then check the shared box(Selected Form)首先到Product->Scheme->ManageScheme然后检查共享框(Selected Form)
now pod install现在pod 安装
if problem still arise如果问题仍然存在
Try this尝试这个

pod setup
pod install

if still have problem.(this worked for me)如果还有问题。(这对我有用)

rm -rf ~/.cocoapods 
pod setup
pod install

if problem still there then last but not least如果问题仍然存在,那么最后但并非最不重要的

rm -rf ~/.cocoapods 
git clone https://github.com/CocoaPods/Specs.git ~/.cocoapods/repos/master
pod install

To generate a workspace you must have the installer line in your Podfile saying:要生成工作区,您的 Podfile 中必须有安装程序行说:

integrate_targets => true

like this:像这样:

install! 'cocoapods', :integrate_targets => true

If you are using frameworks you do not need the workspace generated.如果您使用框架,则不需要生成工作区。

If you've done all the above steps and if it's still not working, try如果您已完成上述所有步骤,但仍无法正常工作,请尝试

pod install --repo-update

I tried all the above steps, and still it was generating pod folders with blank dependency names.我尝试了上述所有步骤,但它仍然生成具有空白依赖项名称的 pod 文件夹。 This step should download all the required dependencies for your project and will also create the .xcworkspace此步骤应为您的项目下载所有必需的依赖项,并且还将创建 .xcworkspace

Try adding尝试添加

use_frameworks!

between the platform line and the target line, then redo pod install from your terminal.在平台线和目标线之间,然后从终端重做pod install

I did我做了

rm -rf ~/.cocoapods/repos/trunk/ rm -rf ~/.cocoapods/repos/trunk/

After that it worked again.之后它再次起作用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM