SAB doesn't recognize my Xcode install anymore

I had SAB working a few weeks ago for building both iOS and Android apps. However, when I tried building the same iOS app today, it says I need to “Install Xcode from the Mac App Store” first. But Xcode was installed and working. So I’ve spent a lot of time and tried:

  • Uninstalling/reinstalling Xcode 9.2 (9C40b) on macOS High Sierra
  • Reinstalling Command Line Tools (macOS 10.13) for Xcode 9.2
  • Reinstalling SAB
  • Restarting my Mac, SAB, Xcode multiple times

Anyone have thoughts on what to do? Thanks.

This message was waiting to be approved (I don’t know why). Sorry for the delay.

Matt submitted a support request to http://software.sil.org/scriptureappbuilder/support/. I responded there, but I will respond here as well for the community to know.

When iOS 11 came out, it was required that the app icons to be included in the compiled asset catalog for the app to be approved to the Apple App Store. To re-compile the asset catalog, we have to use a tool that is only available in Xcode 9+ (not in the Xcode Command-Line Tools). So now you have to have Xcode installed.

If you had Xcode Command-Line Tools before and then install Xcode 9.2, it looks like the active developer directory can not be updated to Xcode. To check what the active developer directory is, run the following command from the terminal:

xcode-select -p

If it is install correctly, it should return:

$ xcode-select -p
/Applications/Xcode.app/Contents/Developer

In his case, it still showed the Command-Line Tools which won’t work.

$ xcode-select -p 
/Library/Developer/CommandLineTools 

To check for the correct version of Xcode, SAB does the following:

  1. runs xcode-select -p and make sure the path ends in .app/Contents/Developer (i.e. points to a directory in a .app container, most likely Xcode, but it can be renamed and it still works).
  2. runs xcodebuild -version and make sure the returned version number >= 9.0

I will try to update the installation documentation to have the user verify this when installing.

For His Great Name,
Chris

Great! Thanks for the detailed info.

I was able to fix it by running this command at the Terminal (to point things in the correct direction):

sudo xcode-select -s /Applications/Xcode.app/Contents/Developer

So how do you fix this if “xcode-select -p” returns “/Library/Developer/CommandLineTools”?

I tried running “sudo xcode-select -s /Applications/Xcode.app/Contents/Developer” and it asked for my password but my password won’t work.

How do I fix this?

1 Like

The password should be the password you use to login to your computer.

Yep that was the password I was using with no luck. I ended up closing down terminal, reopening, trying my system password again, and it worked. Thanks!

Thanks for this. I was getting the same problem and I ran that ‘sudo…’ line in my Terminal and it fixed the problem.