I use GnuPG installed via Homebrew. The recent upgrade to GnuPG 2.3.1 broke my YubiKey 4 integration.
$ gpg --version gpg (GnuPG) 2.3.1 libgcrypt 1.9.3
$ gpg --card-status gpg: selecting card failed: Operation not supported by device gpg: OpenPGP card not available: Operation not supported by device
The YubiKey was still recognized by the YubiKey Manager and by System Report of macOS. Downgrading GnuPG with the following commands solved the issue for me:
$ brew install firstname.lastname@example.org $ echo 'export PATH="/email@example.com/bin:$PATH"' >> ~/.bash_login
Maybe you're already aware of this. I just wanted to let you know about this issue and document the workaround for others.