I use Background Mode (voip) capabilities for my app in XCode. When I build the app through XCode with a provisioning profile that is allowed this capability - the app works. But then I build my iOS app from command-line in the following manner:
xcodebuild -workspace test.xcworkspace -scheme test -sdk iphoneos clean build archive -archivePath test.xcarchive
xcodebuild -exportArchive -archivePath test.xcarchive -exportPath acc exportFormat ipa
Apparently the "xcodebuild -exportArchive ..." line was deprecated without using the -exportOptionsPlist argument. So I created an options.plist in the same directory that looked like:
<plist version="1.0"> <dict> <key>teamID</key> <string>734KHEMHW2</string> <key>method</key> <string>development</string> <key>uploadSymbols</key> <true/> </dict> </plist>
With my corresponding team ID found on http://developer.apple.com.
Then used the following line to export to ipa:
xcodebuild -exportArchive -exportOptionsPlist options.plist -archivePath test.xcarchive -exportPath .
And this successfully created the ipa with voip capabilities enabled.