Circle CI failing build when running code specific to ios 13

After the ios 13 update, I added some code specific to ios13. Then i got this error:
Use of unresolved identifier ‘UINavigationBarAppearance’; did you mean ‘UINavigationBarDelegate’?

UINavigationBarAppearance - Added in ios13

So I changed my circle ci config.yml file:

mac_exec:
macos:
xcode: “11.0.0

But since then I am getting this error:

#!/bin/bash --login -o pipefail echo 'export BUNDLER_VERSION=$(cat Gemfile.lock | tail -1 | tr -d " ")' 
>> $BASH_ENV source $BASH_ENV sudo gem install bundler

Fetching bundler-2.0.2.gem bundler's executable "bundle" conflicts with /Users/distiller/.rubies/ruby- 
2.6.3/bin/bundle Overwrite the executable? [yN]

bundler is already present in the image, and on the path, so you should not need to install it.

If you do need to, then you can run gem install bundler (no sudo) required.

  configure-bundler:
      steps:
        - run:
            name: Configure Bundler
            before_install: gem update bundler
            command: |
              echo 'export BUNDLER_VERSION=$(cat Gemfile.lock | tail -1 | tr -d " ")' >> $BASH_ENV
              source $BASH_ENV
              sudo gem install bundler

In the about command, is just this line not needed:
sudo gem install bundler

I have removed
sudo gem install bundler
Now it is working fine. But after the unit tests have passes, this is what is happening:

xcrun simctl spawn F01E46D3-4A64-4D7E-9D31-C397D5A0618C log collect --output /Users/distiller/project/output/xcode/system_logs-iPhone\ 8_iOS_13.0.logarchive 2>/dev/null

Exit status: 124.

Any idea on what this is about?