Unable to use command genstrings in OS X El Capitan

1.3k Views Asked by At

I am working on an iOS app using Xcode 6.4 in OS X 10.11 El Capitan (Beta 3).

Whenever I try to localise using the terminal command genstrings I get the message

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

I have been getting this error since the 2nd beta.

Did anyone have to deal with this issue? Thanks in advance!

4

There are 4 best solutions below

4
Nicholas T. On BEST ANSWER

Hi I am also running into this problem when trying to use Xcode 6.4's genstrings in OS X El Capitan, with Xcode 7 installed.

For some reason, the genstrings for Xcode 6.4 in /Applications/Xcode.app/Contents/Developer/usr/bin is missing. I tried to re-install Xcode Developer Tools by running xcode-select --install but to no avail.

The solution I am using is kind of a hack which is making a symlink from the genstrings in Xcode 7 into Xcode 6.4's Developer/usr/bin path as shown in the following command.

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

Looks like Apple is not providing a long term solution

OS X El Capitan no longer ships with genstrings. That utility is instead provided by Xcode 7. This means that older versions of Xcode won’t find genstrings in /usr/bin like they would on older versions of OS X. (19708961)

Xcode 7 Release Notes

0
Ben Lings On

OS X 10.11 (El Capitan) doesn't include genstrings any more (see the Xcode 7 Release Notes). It is now included in Xcode 7. If you have Xcode 6.4 selected as the command line tools, you won't be able to run genstrings. You can, however, use xcrun and set the DEVELOPER_DIR environment variable to run it from Xcode 7, even if that version isn't selected as the command line tools:

DEVELOPER_DIR=<path to Xcode 7.x> xcrun genstrings

e.g., if you have the latest version of Xcode installed as /Applications/Xcode.app, you can do

DEVELOPER_DIR=/Applications/Xcode.app xcrun genstrings
0
AdamPro13 On

For me, I needed to change the path to my active developer directory.

You can see your current active developer directory by running the following:

$ xcode-select -p

Which originally output /Library/Developer/CommandLineTools.

Solution:

I had to run

$ sudo xcode-select -s /Applications/Xcode.app

which then changed the output of the first command to /Applications/Xcode.app/Contents/Developer. After that, the genstrings command was found correctly.