In 4.2 and all previous versions, this has worked beautifully. After upgrading to Xcode 4.3, however, xcodebuild seems unable to discover provisioning files correctly.
# build with 4.2
DEVELOPER_DIR=/Developer xcodebuild -sdk iphoneos -project SomeProject.xcodeproj -target SomeTarget -configuration Release
[ ... ]
** BUILD SUCCEEDED **
# build with 4.3 instead
DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer xcodebuild -sdk iphoneos -project SomeProject.xcodeproj -target SomeTarget -configuration Release
=== BUILD NATIVE TARGET SomeTarget OF PROJECT SomeProject WITH THE DEFAULT CONFIGURATION (Release) ===
Check dependencies
[BEROR]Code Sign error: a valid provisioning profile matching the application's Identifier 'com.project.appname
' could not be found
** BUILD FAILED **
The following build commands failed:
Check dependencies
(1 failure)
Oddly enough, building the same project – with no code or config changes – will succeed with nary a warning, even in Xcode 4.3.