iTunes Application Loader - automation

后端 未结 3 1415
深忆病人
深忆病人 2020-12-30 10:19

Since recently Apple changed the iTunes Connect interface, and people are required to upload apps with the Application Loader.

That\'s nice but I need a script for a

相关标签:
3条回答
  • 2020-12-30 10:55

    In order to see what Applescript commands any application supports, then you need to look at the Dictionary for the application. From my answer to a similar question posted just the other day:

    To get to an application's Dictionary in the the Applescript Editor go to File > Open Dictionary.... A list of all the applications that the OS knows supports Applescript will appear, but the OS won't catch them all so you can use the Browse button. If an application doesn't support Applescript, then it won't be selectable in the dialog window.

    The caveat to this is that there are certain commands that an application is supposed to support but don't, or an application may only support the minimum requirements. These are all very, very simple like open, quit, etc. Your mileage may vary.

    Information to start with GUI scripting can be found on the OS X Automation site. GUI Scripting is a funky way to go, and I don't think you can get the values of onscreen controls, instead only set them. You should only do this if no other avenue works.

    If you wish to stick with Python, then you can look at the py-appscript project, but this is still dependent on Applescript support of the application.

    0 讨论(0)
  • 2020-12-30 10:55

    You can use any of these commands either one by one or all in one bash script to actually automate your Archive, Extract and Upload process to the AppStore Connect.

    ARCHIVE

    xcodebuild -workspace "${APP_NAME}.xcworkspace" -scheme "${APP_NAME}" clean archive -configuration release -sdk iphoneos -archivePath ".build/${TEMP_BUILD}.xcarchive"
    

    EXPORT TO IPA

    xcodebuild -exportArchive -archivePath  ".build/${TEMP_BUILD}.xcarchive" -exportOptionsPlist  "ExportOptions.plist" -exportPath  ".build/${TEMP_BUILD}.ipa"
    

    UPLOAD IPA TO TESTFLIGHT

    altool --upload-app -f ".build/${TEMP_BUILD}.ipa/${APP_NAME}.ipa" -u $APP_STORE_USERNAME -p $APP_STORE_PASSWORD
    

    1) If you don't know what should be your ExportOptions.plist file just take a look here.

    2) To use altool from anywhere in the terminal you could add it to your PATH env variable by typing in terminal:

    MacBook-Pro:~ denis$ export PATH=$PATH:/Applications/Xcode.app/Contents/Applications/Application\ Loader.app/Contents/Frameworks/ITunesSoftwareService.framework/Support/
    MacBook-Pro:~ denis$ source ~/.bash_profile
    
    0 讨论(0)
  • 2020-12-30 11:08

    Application Loader documentation mentions an altool which can be used for this purpose. (https://itunesconnect.apple.com/docs/UsingApplicationLoader.pdf)

    The relevant information:

    You can use altool, Application Loader’s command-line tool for validating and uploading your application binary files to the App Store.

    To validate your build before upload or to automate uploads of valid builds to the App Store, you can include altool in your continuous integration systems. altool is located in the Application Loader.app/Contents/Frameworks/ITunesSoftwareService.framework/Versions/A/Support/ folder. (So full path would be /Applications/Xcode.app/Contents/Applications/Application\ Loader.app/Contents/Frameworks/ITunesSoftwareService.framework/Support/altool)

    To run altool, specify one of the following at the command-line:

    $ altool --validate-app -f file -u username [-p password] [--output-format xml]

    $ altool --upload-app -f file -u username [-p password] [--output-format xml]

    Where:

    --validate-app Specifies you want to validate the specified application.

    --upload-app Specifies you want to upload the specified application.

    -f file Specifies the path and filename for the application you are validating or uploading.

    -u username Specifies your username (Apple ID).

    -p password Specifies your user password.

    --output-format [xml | normal] Specifies that you want Application Loader to return output in structured XML format or unstructured text format. By default, Application Loader returns output information in text format.

    0 讨论(0)
提交回复
热议问题