ios - 无法在 OS X El Capitan 中使用命令 genstrings

标签 ios xcode genstrings osx-elcapitan

我正在 OS X 10.11 El Capitan (Beta 3) 中使用 Xcode 6.4 开发 iOS 应用。

每当我尝试使用终端命令 genstrings 进行本地化时,我都会收到消息

genstrings: error: unable to find utility "genstrings", not a developer tool or in PATH

我从第二个测试版开始就一直遇到这个错误。

有没有人必须处理这个问题?提前致谢!

最佳答案

您好,我在安装了 Xcode 7 的 OS X El Capitan 中尝试使用 Xcode 6.4 的 genstrings 时也遇到了这个问题。

由于某些原因,/Applications/Xcode.app/Contents/Developer/usr/bin 中 Xcode 6.4 的 genstrings 丢失了。我尝试通过运行 xcode-select --install 重新安装 Xcode Developer Tools 但无济于事。

我正在使用的解决方案是一种 hack,它从 Xcode 7 中的 genstrings 到 Xcode 6.4 的 Developer/usr/bin 路径中创建一个符号链接(symbolic link),如下所示显示在以下命令中。

sudo ln -s /Applications/Xcode-beta.app/Contents/Developer/usr/bin/genstrings /Applications/Xcode.app/Contents/Developer/usr/bin

关于ios - 无法在 OS X El Capitan 中使用命令 genstrings,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31323221/

相关文章:

iphone - CoreBluetooth 与 Lego NXT 配对

当键盘出现时,ios激活登录表单上的滚动

iphone - genstrings 工具抛出异常,在解析 XCode 项目时中止

ios - 为两个不同分支上的版本创建 Xcode 项目的 zip 存档

ios - 出现删除按钮时重新计算自定义 UITableViewCell 的高度

iphone - 当显示 UILocalnotification 时,如何在后台创建或设置设备锁定

swift - 在 NSLocalizedString 中设置 tableName 参数时,genstrings 不起作用

ios - 如何使用终端使用 xCode 命令行工具?

ios - 接口(interface) Object() {} 和 @implementation Object @end 中的变量之间的区别

objective-c - 如何向以编程方式创建的按钮添加方法?