Reputation: 341
My project is able to build and run on my iPhone using Xcode, which means both certificates and provisioning profiles are rightly set up. But if I try to use command line tool to run my app on my device, it tells me that no matching provisioning profiles found. What could be the problem?
As you can see in this picture it shows no issue with certificate and provisioning profiles. But when I use command line tool, it failed.
This is what I type in command line:
xcodebuild \
-workspace MyApp.xcworkspace \
-scheme Snail \
-configuration Debug \
-destination "platform=iOS,id=<My Device UDID>" \
CODE_SIGN_IDENTITY="iPhone Distribution: My Cert Name" \
clean test
Error in command line tool:
Upvotes: 2
Views: 2042
Reputation: 998
Go to Xcode->preferences->accounts, select your account and then select view details then after select download all. If this don't work delete old developer certificate and add new developer certificate. Or you can try fastlane.
Upvotes: -1
Reputation: 7814
If you don't explicitly specify the profile that xcodebuild
should use, it will use the one set in your target's "Build Settings". In order to specify the profile, you need to know it's UUID (which can be found by opening the .mobileprovision
in a text editor). If your profile UUID is "1234567890", then the updated command to run is:
xcodebuild \
-workspace MyApp.xcworkspace \
-scheme Snail \
-configuration Debug \
-destination "platform=iOS,id=<My Device UDID>" \
CODE_SIGN_IDENTITY="iPhone Distribution: My Cert Name" \
PROVISIONING_PROFILE="1234567890" \
clean test
Of course, be sure that your device is included in the profile :)
Upvotes: 3