KSImageNamed 安装后无效解决方法
UIImage的imageNamed提供文件名自动补全功能。使用[UIImage imageNamed:@"xxx"]时,该插件会扫描整个workspace中的图片文件。
若安装后无效,或许需要做一下修改:
1.打开xcode插件所在的目录:
~/library/Users/“你自己的用户名”/Library/Developer/Xcode/Plug-ins
2.选择已经安装的插件KSImageNamed,右键点击show package contents(显示包内容),
3.找到info.plist 文件,找到DVTPlugInCompatibilityUUIDs的项目,
4.添加C4A681B0-4A26-480E-93EC-1218098B9AA0(当前xcode的一个号码
可在终端执行 defaults read /Applications/Xcode.app/Contents/Info DVTPlugInCompatibilityUUID 即可获取相应号码)
5.再右键“显示包内容”双击contents\MacOS目录下的一个黑色图标,会打开终端窗口,最后打印“进程已完成”之类,
6.重启xcode
注意:xcode6版本适用上述方法,xcode7请看这一篇http://www.cnblogs.com/longling2344/p/5137640.html
Xcode 7安装KSImageNamed失败解决方法
## 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`
以上是官方文档
下载最新版,在第一次安装的时候,跳出bundle选择的时候选择load,不然会安装失败
解决:
1.~/Library/Developer/Xcode/Plug-ins 删除KSImageNamed.
2.命令行敲入`defaults write com.apple.dt.Xcode KSShowExtensionInImageCompletion -bool YES
Xcode8 安装插件成功后 会闪退 ,主要是还不支持的原因吧
Error getting value for key 'strategyClass' of extension 'KSImageNamed.CompletionStrategy.ImageNamed' in plug-in 'com.ksuther.KSImageNamed'