Now add the fetched certificates to your keychain:

    
keychain add-certificates

Update the Xcode project settings to use fetched code signing profiles:

    
xcode-project use-profiles

Install Flutter dependencies:

    
flutter packages pub get

Install CocoaPods dependencies:

    
find . -name "Podfile" -execdir pod install \;

Build the Flutter macOS project:

    
flutter build macos --release

Package the app:

    
APP_NAME=$(find $(pwd) -name "*.app")
PACKAGE_NAME=$(basename "$APP_NAME" .app).pkg
xcrun productbuild --component "$APP_NAME" /Applications/ unsigned.pkg