Many teams run their CI or release environments on Linux servers, such as GitLab Runner, Jenkins, or self-built build nodes. After the app has generated a .ipa file, the next question is: Can the IPA be directly uploaded to the App Store from Linux?

The answer is yes, with the key being to separate the processes—building the IPA and uploading the IPA are not the same thing.

Below explains how to complete the iOS upload process via command line on Linux.


1. Prepare Files Required for Release

Before uploading from Linux, three files need to be prepared:

File Purpose
.ipa iOS app installation package
.p12 iOS distribution certificate
.mobileprovision App Store provisioning profile

These files can come from different sources:

  • Mac build environment
  • CI build system
  • Cloud packaging services

If the team does not have a Mac, certificates and provisioning profiles can also be generated in Windows or Linux environments using AppUploader (Happy Uploading).

General process for generating certificates:

  1. Log in to the Apple Developer account
  2. Go to certificate management
  3. Create a distribution type certificate
  4. Download the .p12 file

Process for creating provisioning profiles:

  1. Go to provisioning profile management
  2. Create a new App Store type
  3. Bind the Bundle ID and certificate
  4. Download the .mobileprovision file

These files will be used during the packaging or CI build phase.
Certificate Generation


2. Build IPA in CI or on Mac

Linux environments typically only handle releases, not building iOS apps.

IPA can be generated in the following ways:

Using Xcode

Execute on Mac:

Product → Archive

Then export the App Store type IPA.


Using Fastlane

If the project uses Fastlane, it can be built via script:

lane :release do
  build_app(
    scheme: "AppScheme",
    export_method: "app-store"
  )
end

Execute:

fastlane release

Generate the .ipa file.

After building, upload the IPA to the Linux server.


3. Install Upload Tool on Linux

Upload tools from Xcode cannot run on Linux, but command-line upload tools can be used.

One way is to use AppUploader CLI.

After downloading AppUploader, the command-line tool can be found in the compressed package.

Confirm the command is executable:

chmod +x appuploader_cli

4. Upload IPA Using Command Line

Execute on the Linux server:

appuploader_cli -f app.ipa -u appleid@example.com -p xxxx-xxxx-xxxx-xxxx -c 2

Parameter explanation:

Parameter Meaning
-f IPA file path
-u Apple Developer account
-p App-specific password
-c Upload channel

Channel explanation:

  • 1 Old upload channel
  • 2 New upload channel

After successful upload, the command line will return the upload status.


5. View Build in App Store Connect

After uploading, go to App Store Connect:

My Apps → App → TestFlight

Wait for Apple to process the build.

After processing is complete:

  • New build version can be seen
  • TestFlight distribution is possible
  • Submission for review is possible
    asc

6. Automate Upload in CI

One advantage of Linux command-line upload is direct integration into CI.

For example, Jenkins Pipeline:

stage('Upload IPA') {
    sh '''
    ./appuploader_cli \
    -u $APPLE_ID \
    -p $APP_PASSWORD \
    -c 2 \
    -f build/app.ipa
    '''
}

CI automatically uploads after building is complete.


7. Common Issue Troubleshooting

Build Not Appearing in App Store Connect

Check:

  • Whether Bundle ID is consistent
  • Whether build number is incremented
  • Whether Distribution provisioning profile is used

Upload Failure

Confirm:

  • App-specific password is correct
  • Network is not blocked
  • IPA file is not corrupted

8. Summary of Linux Release Process

If the process is organized into a tool combination, the structure is as follows:

Phase Tool
Certificate Generation AppUploader
Provisioning Profile Generation AppUploader
IPA Building Xcode / Fastlane
Command-line Upload AppUploader CLI
Review Submission App Store Connect

iOS app upload process is not necessarily tied to macOS.
If the IPA file is already generated, the upload phase can be completely done via command line in Linux environments.

Reference link: https://www.appuploader.net/tutorial/zh/83/83.html