Skip to content

Instantly share code, notes, and snippets.

@dlo
Last active February 2, 2024 02:18
Show Gist options
  • Select an option

  • Save dlo/1568eb5d3317d8b98bc393e58b0f84b2 to your computer and use it in GitHub Desktop.

Select an option

Save dlo/1568eb5d3317d8b98bc393e58b0f84b2 to your computer and use it in GitHub Desktop.

Revisions

  1. dlo revised this gist Jul 16, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion README.md
    Original file line number Diff line number Diff line change
    @@ -10,7 +10,7 @@ Yes, yes, I know you can do this completely via fastlane, but I'm somewhat sadis

    To make this work, open up the build scheme you use to submit your App Store builds, go to "Archive", and then "Post-actions". Click the "+" and "Add Run Script Action". Then, paste in the contents of [post_action.sh](#file-post_action-sh), replacing "[email protected]" with your iTunes Connect username.

    Lastly, place [iTunesExportOptions.plist](#file-itunesexportoptions-plist) in your project directory. Depending on your needs (e.g., if you want to distribute enterprise builds) you may need to tweak it. See `xcodebuild -help` for more details. By default, it assumes you just want to submit the build to the App Store / TestFlight.
    Lastly, place [iTunesExportOptions.plist](#file-itunesexportoptions-plist) in your project directory. Depending on your needs (e.g., if you want to distribute enterprise builds) you may need to make some tweaks. See `xcodebuild -help` for more details. By default, it assumes you just want to submit the build to the App Store / TestFlight.

    ## Dependencies

  2. dlo revised this gist Jul 16, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion README.md
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,7 @@

    This script will automatically upload your app to iTunes Connect after a successful Xcode archive action.

    After doing this about a million times by hand (i.e., "Window > Organizer", then clicking on "Upload to App Store", waiting for teams to load, etc.), I decided I'd had enough. Now, I just go to "Product" > "Archive", sip my margherita, and kick up my feet while the world marvels at my genius, while my app gets distributed to my testers without lifting but a finger. Or...I just take a bathroom break. Either way, it's pretty awesome.
    After doing this about a million times by hand (i.e., opening the Organizer, clicking on "Upload to App Store", waiting for teams to load, etc.), I decided I'd had enough. Now, I just go to "Product" > "Archive", sip my margherita, and kick up my feet while the world marvels at my genius, while my app gets distributed to my testers without lifting but a finger. Or...I just take a bathroom break. Either way, it's pretty awesome.

    Yes, yes, I know you can do this completely via fastlane, but I'm somewhat sadistic and prefer to do my archiving completely within Xcode.

  3. dlo revised this gist Jul 16, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion README.md
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,7 @@

    This script will automatically upload your app to iTunes Connect after a successful Xcode archive action.

    After doing this about a million times by hand (i.e., clicking on "Upload to App Store", waiting for teams to load, etc.), I decided I'd had enough. Now, I just go to "Product" > "Archive", sip my margherita, and kick up my feet while the world marvels at my genius, while my app gets distributed to my testers without lifting but a finger. Or...I just take a bathroom break. Either way, it's pretty awesome.
    After doing this about a million times by hand (i.e., "Window > Organizer", then clicking on "Upload to App Store", waiting for teams to load, etc.), I decided I'd had enough. Now, I just go to "Product" > "Archive", sip my margherita, and kick up my feet while the world marvels at my genius, while my app gets distributed to my testers without lifting but a finger. Or...I just take a bathroom break. Either way, it's pretty awesome.

    Yes, yes, I know you can do this completely via fastlane, but I'm somewhat sadistic and prefer to do my archiving completely within Xcode.

  4. dlo revised this gist Jul 16, 2016. No changes.
  5. dlo revised this gist Jul 16, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion README.md
    Original file line number Diff line number Diff line change
    @@ -20,4 +20,4 @@ Lastly, place [iTunesExportOptions.plist](#file-itunesexportoptions-plist) in yo
    gem install pilot
    ```

    You may want to use it one time interactively on the command line so that your credentials are saved for future pushes.
    You may want to run pilot at least one time prior, interactively on the command line, so that your credentials are saved for future use.
  6. dlo revised this gist Jul 16, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion README.md
    Original file line number Diff line number Diff line change
    @@ -4,7 +4,7 @@ This script will automatically upload your app to iTunes Connect after a success

    After doing this about a million times by hand (i.e., clicking on "Upload to App Store", waiting for teams to load, etc.), I decided I'd had enough. Now, I just go to "Product" > "Archive", sip my margherita, and kick up my feet while the world marvels at my genius, while my app gets distributed to my testers without lifting but a finger. Or...I just take a bathroom break. Either way, it's pretty awesome.

    Yes, yes, I know you can do this completely via fastlane, but I'm somewhat sadistic and prefer to do my archiving within Xcode.
    Yes, yes, I know you can do this completely via fastlane, but I'm somewhat sadistic and prefer to do my archiving completely within Xcode.

    ## Instructions

  7. dlo revised this gist Jul 16, 2016. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion README.md
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,9 @@

    This script will automatically upload your app to iTunes Connect after a successful Xcode archive action.

    After doing this about a million times by hand (i.e., clicking on "Upload to App Store", waiting for teams to load, etc.), I decided I'd had enough. Now, I just hit "Archive", sip my margherita, and kick up my feet while the world marvels at my genius, while my app gets distributed to my testers without lifting but a finger. Or...I just take a bathroom break. Either way, it's pretty awesome.
    After doing this about a million times by hand (i.e., clicking on "Upload to App Store", waiting for teams to load, etc.), I decided I'd had enough. Now, I just go to "Product" > "Archive", sip my margherita, and kick up my feet while the world marvels at my genius, while my app gets distributed to my testers without lifting but a finger. Or...I just take a bathroom break. Either way, it's pretty awesome.

    Yes, yes, I know you can do this completely via fastlane, but I'm somewhat sadistic and prefer to do my archiving within Xcode.

    ## Instructions

  8. dlo revised this gist Jul 16, 2016. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -1,8 +1,8 @@
    ## Summary

    This script will automatically upload your app to iTunes Connect after a successful archive.
    This script will automatically upload your app to iTunes Connect after a successful Xcode archive action.

    After doing this about a million times manually, clicking on "Upload to App Store", waiting for teams to load, etc., I decided I'd had enough. Now, I just hit "Archive", sip my margherita, and kick up my feet while the world marvels at my genius. Or I'll take the dog out. Either way, it's pretty awesome.
    After doing this about a million times by hand (i.e., clicking on "Upload to App Store", waiting for teams to load, etc.), I decided I'd had enough. Now, I just hit "Archive", sip my margherita, and kick up my feet while the world marvels at my genius, while my app gets distributed to my testers without lifting but a finger. Or...I just take a bathroom break. Either way, it's pretty awesome.

    ## Instructions

  9. dlo revised this gist Jul 16, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion README.md
    Original file line number Diff line number Diff line change
    @@ -6,7 +6,7 @@ After doing this about a million times manually, clicking on "Upload to App Stor

    ## Instructions

    To make this work, open up the build scheme you use to submit your App Store builds, go to "Archive", and then "Post-actions". Click the "+" and "Add Run Script Action". Then, paste in the contents of [post_action.sh](#file-post-action-plist), replacing "[email protected]" with your iTunes Connect username.
    To make this work, open up the build scheme you use to submit your App Store builds, go to "Archive", and then "Post-actions". Click the "+" and "Add Run Script Action". Then, paste in the contents of [post_action.sh](#file-post_action-sh), replacing "[email protected]" with your iTunes Connect username.

    Lastly, place [iTunesExportOptions.plist](#file-itunesexportoptions-plist) in your project directory. Depending on your needs (e.g., if you want to distribute enterprise builds) you may need to tweak it. See `xcodebuild -help` for more details. By default, it assumes you just want to submit the build to the App Store / TestFlight.

  10. dlo revised this gist Jul 16, 2016. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -6,9 +6,9 @@ After doing this about a million times manually, clicking on "Upload to App Stor

    ## Instructions

    To make this work, open up the build scheme you use to submit your App Store builds, go to "Archive", and then "Post-actions". Click the "+" and "Add Run Script Action". Then, paste in the contents of [post_action.sh](/post_action.sh), replacing "[email protected]" with your iTunes Connect username.
    To make this work, open up the build scheme you use to submit your App Store builds, go to "Archive", and then "Post-actions". Click the "+" and "Add Run Script Action". Then, paste in the contents of [post_action.sh](#file-post-action-plist), replacing "[email protected]" with your iTunes Connect username.

    Lastly, place [iTunesExportOptions.plist](/iTunesExportOptions.plist) in your project directory. Depending on your needs (e.g., if you want to distribute enterprise builds) you may need to tweak it. See `xcodebuild -help` for more details. By default, it assumes you just want to submit the build to the App Store / TestFlight.
    Lastly, place [iTunesExportOptions.plist](#file-itunesexportoptions-plist) in your project directory. Depending on your needs (e.g., if you want to distribute enterprise builds) you may need to tweak it. See `xcodebuild -help` for more details. By default, it assumes you just want to submit the build to the App Store / TestFlight.

    ## Dependencies

  11. dlo revised this gist Jul 16, 2016. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -6,9 +6,9 @@ After doing this about a million times manually, clicking on "Upload to App Stor

    ## Instructions

    To make this work, open up the build scheme you use to submit your App Store builds, go to "Archive", and then "Post-actions". Click the "+" and "Add Run Script Action". Then, paste in the contents of [post_action.sh](post_action.sh), replacing "[email protected]" with your iTunes Connect username.
    To make this work, open up the build scheme you use to submit your App Store builds, go to "Archive", and then "Post-actions". Click the "+" and "Add Run Script Action". Then, paste in the contents of [post_action.sh](/post_action.sh), replacing "[email protected]" with your iTunes Connect username.

    Lastly, place [iTunesExportOptions.plist](iTunesExportOptions.plist) in your project directory. Depending on your needs (e.g., if you want to distribute enterprise builds) you may need to tweak it. See `xcodebuild -help` for more details. By default, it assumes you just want to submit the build to the App Store / TestFlight.
    Lastly, place [iTunesExportOptions.plist](/iTunesExportOptions.plist) in your project directory. Depending on your needs (e.g., if you want to distribute enterprise builds) you may need to tweak it. See `xcodebuild -help` for more details. By default, it assumes you just want to submit the build to the App Store / TestFlight.

    ## Dependencies

  12. dlo revised this gist Jul 16, 2016. 1 changed file with 6 additions and 2 deletions.
    8 changes: 6 additions & 2 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,10 @@
    ## Description
    ## Summary

    This script will automatically upload Xcode archives to iTunes Connect after a successful build. After doing this about a million times manually, clicking on "Upload to App Store", waiting for teams to load, etc., I decided I'd had enough. Now, I just hit "Archive", sip my margherita, and kick up my feet while the world marvels at my genius. Or I'll take the dog out. Either way, it's pretty awesome.
    This script will automatically upload your app to iTunes Connect after a successful archive.

    After doing this about a million times manually, clicking on "Upload to App Store", waiting for teams to load, etc., I decided I'd had enough. Now, I just hit "Archive", sip my margherita, and kick up my feet while the world marvels at my genius. Or I'll take the dog out. Either way, it's pretty awesome.

    ## Instructions

    To make this work, open up the build scheme you use to submit your App Store builds, go to "Archive", and then "Post-actions". Click the "+" and "Add Run Script Action". Then, paste in the contents of [post_action.sh](post_action.sh), replacing "[email protected]" with your iTunes Connect username.

  13. dlo revised this gist Jul 16, 2016. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -1,12 +1,12 @@
    ## Xcode Script to Auto-Submit To App Store/TestFlight after Archive
    ## Description

    This script will automatically upload Xcode archives to iTunes Connect after a successful build. After doing this about a million times manually, clicking on "Upload to App Store", waiting for teams to load, etc., I decided I'd had enough. Now, I just hit "Archive", sip my margherita, and kick up my feet while the world marvels at my genius. Or I'll take the dog out. Either way, it's pretty awesome.

    To make this work, open up the build scheme you use to submit your App Store builds, go to "Archive", and then "Post-actions". Click the "+" and "Add Run Script Action". Then, paste in the contents of [post_action.sh](post_action.sh), replacing "[email protected]" with your iTunes Connect username.

    Lastly, place [iTunesExportOptions.plist](iTunesExportOptions.plist) in your project directory. Depending on your needs (e.g., if you want to distribute enterprise builds) you may need to tweak it. See `xcodebuild -help` for more details. By default, it assumes you just want to submit the build to the App Store / TestFlight.

    ## Dependences
    ## Dependencies

    [pilot](https://github.com/fastlane/fastlane/tree/master/pilot) from [fastlane](https://github.com/fastlane/fastlane).

  14. dlo revised this gist Jul 16, 2016. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion README.md
    Original file line number Diff line number Diff line change
    @@ -1,10 +1,12 @@
    ## Xcode Script to Auto-Submit To App Store/TestFlight after Archive

    This script will automatically upload Xcode archives to iTunes Connect after a successful build. After doing this about a million times manually, clicking on "Upload to App Store", waiting for teams to load, etc., I decided I'd had enough. Now, I just hit "Archive", sip my margherita, and kick up my feet while the world marvels at my genius. Or I'll take the dog out. Either way, it's pretty awesome.

    To make this work, open up the build scheme you use to submit your App Store builds, go to "Archive", and then "Post-actions". Click the "+" and "Add Run Script Action". Then, paste in the contents of [post_action.sh](post_action.sh), replacing "[email protected]" with your iTunes Connect username.

    Lastly, place [iTunesExportOptions.plist](iTunesExportOptions.plist) in your project directory. Depending on your needs (e.g., if you want to distribute enterprise builds) you may need to tweak it. See `xcodebuild -help` for more details. By default, it assumes you just want to submit the build to the App Store / TestFlight.

    ### Dependences
    ## Dependences

    [pilot](https://github.com/fastlane/fastlane/tree/master/pilot) from [fastlane](https://github.com/fastlane/fastlane).

  15. dlo revised this gist Jul 16, 2016. 3 changed files with 25 additions and 2 deletions.
    16 changes: 15 additions & 1 deletion README.md
    Original file line number Diff line number Diff line change
    @@ -1 +1,15 @@
    This
    This script will automatically upload Xcode archives to iTunes Connect after a successful build. After doing this about a million times manually, clicking on "Upload to App Store", waiting for teams to load, etc., I decided I'd had enough. Now, I just hit "Archive", sip my margherita, and kick up my feet while the world marvels at my genius. Or I'll take the dog out. Either way, it's pretty awesome.

    To make this work, open up the build scheme you use to submit your App Store builds, go to "Archive", and then "Post-actions". Click the "+" and "Add Run Script Action". Then, paste in the contents of [post_action.sh](post_action.sh), replacing "[email protected]" with your iTunes Connect username.

    Lastly, place [iTunesExportOptions.plist](iTunesExportOptions.plist) in your project directory. Depending on your needs (e.g., if you want to distribute enterprise builds) you may need to tweak it. See `xcodebuild -help` for more details. By default, it assumes you just want to submit the build to the App Store / TestFlight.

    ### Dependences

    [pilot](https://github.com/fastlane/fastlane/tree/master/pilot) from [fastlane](https://github.com/fastlane/fastlane).

    ```sh
    gem install pilot
    ```

    You may want to use it one time interactively on the command line so that your credentials are saved for future pushes.
    8 changes: 8 additions & 0 deletions iTunesExportOptions.plist
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,8 @@
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
    <key>method</key>
    <string>app-store</string>
    </dict>
    </plist>
    3 changes: 2 additions & 1 deletion post_action.sh
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,5 @@
    IPA_EXPORT_DIR=$(mktemp -d)
    ITUNES_USERNAME="[email protected]"
    cd "${PROJECT_DIR}"; xcodebuild -exportArchive -exportOptionsPlist iTunesExportOptions.plist -archivePath "${ARCHIVE_PATH}" -exportPath "${IPA_EXPORT_DIR}"

    xcodebuild -exportArchive -exportOptionsPlist "${PROJECT_DIR}/iTunesExportOptions.plist" -archivePath "${ARCHIVE_PATH}" -exportPath "${IPA_EXPORT_DIR}"
    pilot upload --skip_waiting_for_build_processing --username $ITUNES_USERNAME -i "${IPA_EXPORT_DIR}/${PRODUCT_NAME}.ipa"
  16. dlo revised this gist Jul 16, 2016. 2 changed files with 3 additions and 1 deletion.
    1 change: 1 addition & 0 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    This
    3 changes: 2 additions & 1 deletion post_action.sh
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,4 @@
    IPA_EXPORT_DIR=$(mktemp -d)
    ITUNES_USERNAME="[email protected]"
    cd "${PROJECT_DIR}"; xcodebuild -exportArchive -exportOptionsPlist iTunesExportOptions.plist -archivePath "${ARCHIVE_PATH}" -exportPath "${IPA_EXPORT_DIR}"
    pilot upload --skip_waiting_for_build_processing --username [email protected] -i "${IPA_EXPORT_DIR}/${PRODUCT_NAME}.ipa"
    pilot upload --skip_waiting_for_build_processing --username $ITUNES_USERNAME -i "${IPA_EXPORT_DIR}/${PRODUCT_NAME}.ipa"
  17. dlo created this gist Jul 16, 2016.
    3 changes: 3 additions & 0 deletions post_action.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,3 @@
    IPA_EXPORT_DIR=$(mktemp -d)
    cd "${PROJECT_DIR}"; xcodebuild -exportArchive -exportOptionsPlist iTunesExportOptions.plist -archivePath "${ARCHIVE_PATH}" -exportPath "${IPA_EXPORT_DIR}"
    pilot upload --skip_waiting_for_build_processing --username [email protected] -i "${IPA_EXPORT_DIR}/${PRODUCT_NAME}.ipa"