为CocoaPods插件设置Xcode

编程入门 行业动态 更新时间:2024-10-27 10:28:41
本文介绍了为CocoaPods插件设置Xcode的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在尝试设置终端/ Xcode以正常运行 Xcode CocoaPods插件 。

I am trying to setup terminal/Xcode to work correctly for the Xcode CocoaPods Plugin.

当我从插件运行集成cocoapods选项时,我收到一条消息:

When I run integrate cocoapods option from the plugin I get a message:

[33m警告:CocoaPods要求您的终端使用UTF-8 编码。请参阅 github/CocoaPods/guides.cocoapods。 org / issues / 26 for 可能的解决方案。[0m

[33mWARNING: CocoaPods requires your terminal to be using UTF-8 encoding. See github/CocoaPods/guides.cocoapods/issues/26 for possible solutions.[0m

我搜索了这个问题的答案但我找不到它。决议似乎是为了完成以下内容:

I have searched for the answer to this but I cannot find it. The resolution appears to be to complete the following:

export LC_ALL="en_US.UTF-8"

我不知道如何完成此操作?我在终端中运行了这个,然后当我输出语言环境时,我看到以下内容:

I am not sure how to complete this? I have run this in terminal and then when I output the locale I see the following:

LANG="en_GB.UTF-8" LC_COLLATE="en_GB.UTF-8" LC_CTYPE="en_GB.UTF-8" LC_MESSAGES="en_GB.UTF-8" LC_MONETARY="en_GB.UTF-8" LC_NUMERIC="en_GB.UTF-8" LC_TIME="en_GB.UTF-8" LC_ALL="en_GB.UTF-8"

但是,当我退出/重新打开终端时,LC_ALL再次为空。在这之后有什么我应该跑的吗?

However, when I quit/reopen Terminal the LC_ALL is blank again. Is there something I should run after this?

编辑 - 我看过这个链接 perlgeek.de/en/article/set-up-a-clean-utf8-environment 但仍然无法完成区域设置的安装,不确定如何。

EDIT - I have seen this link perlgeek.de/en/article/set-up-a-clean-utf8-environment but still unable to complete the install of the locale, not sure how.

推荐答案

所以有两种方法可以解决这个问题,这在这里有两种类型的答案。

So there's two ways to approach this, which is reflected in the two types of answers here.

一种是通过更改shell配置(例如.bashrc或locale默认值)对您的环境进行永久性更改。因此,在另一台机器上运行此应用程序将遇到类似的错误。

One is to make a permanent change to your environment by changing your shell configuration (e.g. .bashrc or locale defaults). So running this app on another machine will run into similar errors.

另一种方法是将此设置更改为应用程序构建过程的一部分,因此它将在任何计算机上成功运行 - 但每次创建新应用程序时使用Cocoapods插件,你需要添加这个脚本。

The other way is to change this setting as part of the build process of your app, so it will run successfully on any machine - but every time you create a new app using the Cocoapods plugin you'll need to add this script.

我的选择是后者,所以这里是如何做到的:

My preference is for the latter, so here's how to do that:

编辑您当前的构建方案 - cmd-option-R

Edit your current build scheme - cmd-option-R

展开 Build ,然后选择预行动

添加新运行脚本操作

然后为您的脚本添加:

export LC_ALL="en_US.UTF-8"

这对我有用。它看起来应该是这样的:

This worked for me. It should look something like this:

更多推荐

为CocoaPods插件设置Xcode

本文发布于:2023-07-23 09:30:55,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1195972.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:插件   CocoaPods   Xcode

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!