Xcode 7安装KSImageNamed失败解决方法

5 篇文章 0 订阅

KSImageNamed的官方Git描述如下:

How do I use it?

Build the KSImageNamed target in the Xcode project and the plug-in will automatically be installed in ~/Library/Developer/Xcode/Plug-ins. Relaunch Xcode and imageNamed: will magically start autocompleting your images.

Important: Old versions of KSImageNamed were installed in ~/Library/Developer/Application Support/Developer/Shared/Xcode/Plug-ins. Make sure to remove KSImageNamed.xcplugin from there before installing the new one.

How do I include file extensions when autocompleting?

Enter the following command and relaunch Xcode:

defaults write com.apple.dt.Xcode KSShowExtensionInImageCompletion -bool YES

安装方法是:在官方Git上下载这个工程然后直接用Xcode打开,command+B编译即可,编译成功以后,重启Xcode就可以了。

如果是第一次安装,重启Xcode时会弹出对话框,切记在跳出bundle选择的时候选择load,不然会安装失败,这样的话,解决方法如下:
官方文档中说安装地址在~/Library/Developer/Application Support/Developer/Shared/Xcode/Plug-ins,但优胜美地是在~/Library/Developer/Xcode/Plug-ins(安装的时候选择的吧,给忘了),rm -rf 那个KSImageNamed.xcplugin文档,然后命令行敲入defaults write com.apple.dt.Xcode KSShowExtensionInImageCompletion -bool NO注意是NO,让后重新安装就可以重新来过,别忘记load bundle!

如果曾经安装过,那么就先删除那个插件(过程如上),再defaults write com.apple.dt.Xcode KSShowExtensionInImageCompletion -bool NO,ok,重新来过

就是这样

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值