How can I get Xcode working on my Mac Sierra (10.12.6)
Xcode 9.2 works well for Mac OS Sierra (10.12.6). I installed it today (3rd Feb 2020).
You can get it here at this URL: https://developer.apple.com/download/more/ to download a version of Xcode you want. Specifically, get 9.2. This is the recent version that works with mac OS Sierra.
Edit: Xcode 9.2.1 is no longer an available version. 9.2 works.