How to archive an app with Firebase SDK using CocoaPods on Mac Catalyst
![Oscar de la Hera Gomez](https://www.delasign.com/CDN/headshots/profile.webp)
![The Firebase, CocoaPods and Mac Catalyst Logos](https://www.delasign.com/CDN/images/How-to-archive-an-app-with-Firebase-SDK-using-CocoaPods-on-Mac-Catalyst-Hero.webp)
The following tutorial offers a step by step on how to archive a Mac Catalyst app that uses the Firebase SDK via Cocoapods.
![The Open SSL error that we encountered when trying to build the MacOS App](https://www.delasign.com/CDN/images/OpenSSL-Error.webp)
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
![A screenshot of the shell script hosted on Github gists](https://www.delasign.com/CDN/images/Shell-Script.webp)
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
![A screenshot of terminal showing how to set the current directory for your script](https://www.delasign.com/CDN/images/Set-Current-Directory.webp)
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
![A screenshot of us cleaning Sans Hands for a MacOS Archive](https://www.delasign.com/CDN/images/Clean-Build-Folder.webp)
Open your project in Xcode and press cmd + shift + k to clean your build folder.
Step Four: Run your shell script
![A screenshot of terminal showing you how to run the script.](https://www.delasign.com/CDN/images/Run-Shell-Script.webp)
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
![A screenshot showing you how to archive a MacOS App](https://www.delasign.com/CDN/images/Archive-App.webp)
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.