Setup a New Machine for Apple Development is tiring! or?
I am happy to have a new machine but it turns out I have lost so many hours to build my project. It turns out that upgrade from Mojave to Catalina is quite challenging yet it tells me a lot and uncover hidden meaning of every script, commandline, and whatever it is to let me back on the track.
Xcode
First thing first, switching different Xcode. My current project was built using Xcode11.2, Swift5.1. That of course cannot just be copied and build with current state using new Xcode12.4, new Swift version 5.3.
It tells me about the nightmare of having binary dependency which unless the technology handles this, different ABI will result to compilation error. Everyone know this but me 😭.
Ruby, Gem
As I need to rebuild my binary dependency, another wall blocking my way. Ruby is unforgiving with version difference, or I after quick browsing, it seems that I am not reading documentation enough. But it eventually solved. Spoiler, I should reinstall mac ruby with brew install ruby
and manually updating PATH as follows in order to recognise plugin
and gem
installation.
export PATH="/usr/local/opt/ruby/bin:$PATH"export PATH="/usr/local/opt/ruby/bin:$PATH"export PATH="/usr/local/lib/ruby/gems/3.0.0/bin:$PATH"
Xcode-Select
Yup, I think most of us (developers) will forget the last time doing xcode-select
. This tool will handle CLI xcode version when we have different xcode installation. So, project A will use newest Xcode, while another one will use older version.
xcode-select -s /Applications/Xcode11.3.app
Conclusion
Maybe it’s just me. Or if you too, please share yours in comment to let me update this post and help another suffered one.