How to archive an app with Firebase SDK using CocoaPods on Mac Catalyst


The following tutorial offers a step by step on how to archive a Mac Catalyst app that uses the Firebase SDK via Cocoapods.

This is what we see on XCode 12 when trying to build the app without our solution. Please note that this was present on Xcode 11 when we initially delivered the app in 2021.
On our journey towards creating Sans Hands, we were very frustrated when we discovered that we could not archive the Mac Catalyst app for App Store delivery, due to an 'openssl_grpc/x509.h' file not found error. This issue was heavily discussed on Github and was eventually resolved by lukemmtt via the script provided below.
Update June 16th, 2022
Please note that we have confirmed appfrilans comment and that this this is not an issue if you use Swift Package Manager.
Step One: Create the shell script

Create a shell script file that contains the code below. For the purposes of this demonstration, this file is titled firebase-sdk-cocoapods-mac-catalyst.sh
Step Two: Open Terminal and set the current directory to your script location

Open terminal and set the current directory to the location where you created the script.
Step Three: Open your project in Xcode and clean your build folder

Open your project in Xcode and press cmd + shift + k to clean your build folder.
Step Four: Run your shell script

In Terminal, run the following line:
sh firebase-sdk-cocoapods-mac-catalyst.sh
Please note that this assumes your shell script is called firebase-sdk-cocoapods-mac-catalyst.sh.
Step Five: Archive your Mac Catalyst App

In Xcode, select Product -> Archive.
Please note that your Xcode must be set to Any Mac (Mac Catalyst, Apple Silicon, Intel) in the device / simulator selector. A sample of what that looks like can be found in the screenshot for Step Four.
Any Questions
Please send us a note to inquiries@delasign.com with any thoughts or feedback you may have.