For all of you who can't build WebDriverAgent in Xcode 9 it's because the WebDriverAgent project isn't updated in Appium 1.21. To fix it simply clone the repo from this link https://github.com/facebook/WebDriverAgent and replace it with downloaded WebDriverAgent with Appium.
Also run ./Scripts/bootstrap.sh in this directory.