You can validate from the command line using the command:
xcrun -sdk iphoneos Validation /path/to/App.{app or ipa}
It's a bit unclear what checks it performs, but presumably it does as least code-signing and icon dimensions.
In addition to local validation, it's possible to perform online validation (but only for IPA packages):
xcrun -sdk iphoneos Validation -verbose -online /path/to/App.ipa
For this to work you need to have your iTunes Connect credentials stored in a special entry on your keychain. To create this entry:
- Open the Keychain Access application;
- Create a new password item (File > New Password item…)
- Keychain Item Name:
Xcode:itunesconnect.apple.com
- Account Name/Password: Your credentials for iTunes Connect
Online validation seems to be fairly rough, but does all the checks that would otherwise be performed validating an archive from with the Organiser window in Xcode. Sadly it doesn't seem to set a non-zero exit code on failure, which means output scraping to detect errors. My current heuristic for detecting failure is the presence of any output after the Performing online validation...
line.
Given the lack of documentation it's almost certainly not supported.
xcode-select -p
-name Validation – Hillhouse