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 automating my work.
How can an app like App Loader be automated?
I was thinking of something written in AppleScript ... but I don't know what actions it exposes (if any). Found somewhere that I could also do GUI scripting from within AppleScript, but I can't find docs on that.
What I need ... some way to trigger input actions (mouse clicks / keyboard input) and read the text from the various controls displayed.
If that would be possible in Python/Ruby it would be great, but AppleScript is fine.
OS X is version 10.6.4.
Any suggestions are appreciated.
Thanks,
Application Loader is a developer tool (part of Xcode) that uploads apps to the Mac/iOS App Stores for sale.
Application loaders are expected to instantiate all parts of an application, wiring everything together. They may be manually implemented, if compile time wiring is preferred, or core/third party implementations may be used, for example that provide a runtime dependency injection framework.
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
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With