Lest find out how to get .ipa file from XCode archive.
1) Prepare exportOptions.plist.
Example:
<?xml version="1.0" encoding="UTF-8"?>PROVISIONING_PROFILE_NAME - just name, without extension.
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>compileBitcode</key>
<true/>
<key>method</key>
<string>ad-hoc</string>
<key>provisioningProfiles</key>
<dict>
<key>APP_BUNDLE_NAME</key>
<string>PROVISIONING_PROFILE_NAME</string>
</dict>
<key>signingCertificate</key>
<string>iPhone Distribution</string>
<key>signingStyle</key>
<string>manual</string>
<key>teamID</key>
<string>YOUR_TEAM_ID</string>
<key>thinning</key>
<string><none></string>
</dict>
</plist>
2) Execute command:
xcodebuild -exportArchive -archivePath app.xcarchive -exportPath /AppIPA -exportOptionsPlist exportOptions.plist
Thats it!