Can't Install Brew

I get into Chapter 6 and then am required to install two more products: Brew and Vapor. I try to install Brew and get the error message:

/bin/bash: line 112: /usr/local/bin/git: Bad CPU type in executable
Failed during: git init -q

and it aborts without installing anything. Some Googling points to maybe it isn’t compatible with Catalina. I can’t find anything on the Homebrew site. This obviously precludes me installing Vapor.

I have no interest in learning the intricacies and hacking my way through Brew in order to install Vapor of which I also have no knowledge of. I bought this book to learn how to implement notifications via Swift using XCode, not having to hack through other products simply to get the tutorials to work.

I’ve created the required db in MySQL and have a PHP site built and ready to implement push notifications. I guess I’ll just read the book and “pretend” I have a working Swift app until the tutorial progresses to the PHP phase.

Does anyone have any suggestions on how to work around not having Vapor?

Thanks.

I’m sorry you’re having problems with your mac’s configuration. Homebrew definitely works on catalina as I’ve been using it since before that release. However, as stated at the start of chapter 6, if you don’t need to run or design your own webserver, you can skip the chapter. It sounds like you already have the server side stuff setup the way you want.

All you’ll need to do is change the payload that you send in the ApnsUploads.swift file, which you learn how to create in chapter 7. Right now it sends a ‘token’ and a ‘debug’ field. Just change that to send whatever information you wish to receive in your webservice for registering a token.

Thanks for the quick reply. I’m guessing my ‘Bad CPU type’ error may be because I’m using a 2013 MacPro.

Thanks the for the help and patience. I’m looking forward to getting on with the book.

Randy

How did you install Git? If you use the one bundled with Xcode, it will be in /usr/bin, not /usr/local/bin. That’s where I’d start. If you don’t have the Xcode command line tools installed (this includes Git), then

xcode-select --install

will do the trick.