java 键入_永远不要再键入pod install

java 键入

I was once working on a bugfix & taking help from my friend. He, out of nowhere, did a cool magic trick that grabbed my attention.

我曾经在进行错误修正,并从朋友那里得到帮助。 他无处不在,做了一个很酷的魔术,引起了我的注意。

With a cool keyboard shortcut, all the pods were installed 😲😲😲

借助出色的键盘快捷键,所有吊舱均已安装installed

On further inquiring, I find out something that was so obvious yet we missed it many times. So here’s the trick.

在进一步查询时,我发现了一些显而易见的东西,但我们却多次错过了。 所以这就是窍门。

Problem:

问题:

Whenever we switch branches, we need to do a pod install, every single time.

每当我们切换分支机构时,我们都需要一次安装Pod。

Solution:

解:

Let's create a script, pump it into Xcode & hook it up with a keyboard shortcut.

让我们创建一个脚本,将其泵入Xcode并使用键盘快捷键将其连接起来。

Step 1: Creating the Script

步骤1:建立指令码

You don't need to worry about anything. Download the script from here.

您无需担心任何事情。 从此处下载脚本。

Alternatively, you can create the script yourself.

或者,您可以自己创建脚本。

The script basically asks the Terminal App to open the project directory & do a pod install.

该脚本基本上要求终端应用程序打开项目目录并执行Pod安装。

#!/bin/sh
osascript <<END
tell application "Terminal"
if not (exists window 1) then reopen
activate
do script "cd `pwd`;pod install" in window 1
end tell
END

Step 2: Pump the script into Xcode.

步骤2:将脚本输入Xcode。

Xcode → Behaviors →Tap On + Button → Name the custom workflow as pod-install → Run Script → Select the script

Xcode→行为→点击+按钮→将自定义工作流程命名为pod-install→运行脚本→选择脚本

Step 3: Hook up a Keyboard Shortcut

步骤3:连接键盘快捷键

Next to your script name, just double click and assign any keyboard shortcut. My personal favourite is ⌘P, since I don't print my code 😛

在脚本名称旁边,只需双击并分配任何键盘快捷键。 我个人最喜欢的是⌘P,因为我不打印代码😛

That's it! You are done! Happy Coding!

而已! 大功告成! 编码愉快!

翻译自: https://medium.com/@abhishekbedi/never-type-pod-install-again-ever-eb55386eef59

java 键入

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值