Fetch the code signing files from App Store Connect:

    
app-store-connect fetch-signing-files $(xcode-project detect-bundle-id) \
    --platform IOS \
    --type IOS_APP_STORE \
    --certificate-key=@file:/path/to/cert_key \
    --create
    

    Where cert_key is either your exported iOS Distribution certificate private key
or a new private key which automatically generates a new certificate. The certificate
will be created from the private key if it doesn’t exist in App Store Connect.

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: