Injectios
Injectios

Reputation: 2797

xcodebuild provisioning profiles not found?

I'll try to be polite talking about xCode.

Issue:

we updated provisioning profiles because prev ones are expired. Now I can archive/build from xCode but can't using xcodebuild (which must be the same)

I did everything:

sudo xcodebuild -scheme nl.xxx.demo.iphone -workspace xxx.xcworkspace clean build

error:

=== BUILD TARGET xxxWatchAppDemo Extension OF PROJECT xxx WITH CONFIGURATION Debug ===

Check dependencies
Code Sign error: No provisioning profiles found: No non–expired provisioning profiles were found.

But when I'm archiving or building through xCode everything is just fine, and inside ipa, embedded.mobileprovision is actually our new mobileprovision with UUID d9179316-6950-4369-94dc-b7d71bba25a1


And if I explicitly set provisioning profile - it doesn't work out:

 sudo xcodebuild -scheme nl.xxx.demo.iphone -workspace xxx.xcworkspace archive PROVISIONING_PROFILE=d9179316-6950-4369-94dc-b7d71bba25a1

error

Code Sign error: No matching provisioning profile found: Your build settings specify a provisioning profile with the UUID “d9179316-6950-4369-94dc-b7d71bba25a1”, however, no such provisioning profile was found.

Not found??? Really?

I checked /Users/xxx/Library/.../Provisioning Profiles/... and it's there. I deleted it, added, repeated it 10 times, no result.

What kind of magic it is?

Any help appreciated. Thanks

Upvotes: 0

Views: 2132

Answers (1)

Injectios
Injectios

Reputation: 2797

So Jenkins has been running under buildagent user, however provisioning profiles weren't found.

I created symbolic link to my
/buildagent/Library/MobileDevice/ProvisioningProfiles/ in very root folder - /Library/.

That solved my issue

Upvotes: 1

Related Questions