Jenkins cannot find our recently updated provisioning profiles and after trying every known solution I'm running out of ideas what could be wrong.
Build jobs fail with error:
No profile matching 'xxxxx' found: Xcode couldn't find a profile
matching 'xxxxx'.
The build server is a Mac, running Xcode 8 and we're using Jenkins with the Xcode plugin.
Building and signing with Xcode 8 directly on the same machine is successful and I installed all the required profiles by double-clicking them.
Does anyone know any workable solution to fix this issue?
Put your provisioning profiles under
User/Shared/Jenkins/Library/Mobile Device/Provisioning Profiles.
You have to create manually folder under Library folder.
And make sure that your Distribution certificate is in "System" tab in keychain Access. If not then copy from "Login" tab and paste under "System" tab.
The fix for myself was giving the jenkins user proper permissions for the ~/Library/MobileDevice folder and the ~/Library/MobileDevice/Provisioning\ Profile.
Otherwise the jenkins user can't read from the provisioning file folder.
Related
I am trying to Publish my first App for IOS Distribution, on my Macbook Air using VS Studio for Mac V17.4.2 and XCode V14.2.
I have created and downloaded the certificates and provisioning profiles.
When I try the Archive for Publish on VS I get an error:
Could not find any provisioning profiles for project on IOS
When I look at the project Bundle Signing settings I get following screen:
The bundle identfier eg com.companyname.project is the same in project properties and provisioning profile.
The signing certificates for IOS Distribution are loaded into Xcode.
Can anyone please indicate to me as how to resolve the above error.
One thing I am not sure is where VS is looking for the provisioning profile file as it is currently in my downloads folder and I have clicked on.
Thanks
Have tried looking online but could not find any solution.
I'm trying to build a CI pipeline for my xCode project. I've been struggling with this for the past 2 days.
These are the tasks used in my pipeline:
Install an Apple Certificate
Install an Apple provisioning profile
pod install
Xcode build & clean
Copy files to $(build.artifactstagingdirectory)
Publish Artifacts to drop folder
I've seen in the documentation that we need to check the Create App Package checkbox if we need to have and ipa package. But whenever I check the check
❌ error: No profile for team 'teamID' matching 'provision_name.mobileprovision' found: Xcode couldn't find any provisioning profiles matching 'teamId/provision_name.mobileprovision'. Install the profile (by dragging and dropping it onto Xcode's dock item) or select a different one in the Signing & Capabilities tab of the target editor. (in target 'project_name' from project 'project_name')
Here's a two snippets about signing and exporting options in xCode build task:
So anyone have an idea why this issue is happening?
As Paulw11 mentioned in his comments above, the issue was in setting the name of the provisioning profile in Signing & Provisioning section.
As he said, the Install an Apple provisioning profile will set the UUID variable needed in the task mentioned above. It will be populated while the pipeline is running.
So here's the working pipeline for me now:
Tasks:
Signing & provisioning properties:
Package options:
I am running an iOS build on Jenkins locally. Using Xcode 8.2.1. Using manual signing (i.e. provisioning profile, Team and Signing Certificate correctly selected in Target-> General section.). When I build the app through Xcode, the app builds and archives fine using my ad-hoc distribution certificates. However, when I try building using Jenkins, I get the following error (I am using my own build script to build the app and not using the Jenkins Xcode build plugin)-
Check dependencies
[BCEROR]No profile matching 'xxx' found: Xcode couldn't find a profile matching 'xxx'. Install the profile (by dragging and dropping it onto Xcode's dock item) or select a different one in the General tab of the target editor.
Btw, I already tried the following but those did not help-
copying the provisioning profile in question to the /Users/Shared/Jenkins/Library/MobileDevice/Provisioning Profiles location.
I am trying to build project on another mac,not the one on which I'm developing.And I chose Jenkins to help with it.
I have seen similar questions,but my situation seems different.
Below is the log from Jenkins console:
something has been done before:
export the profile from organizer of the old one and import to the new one.
copy the keys from keychain and copy to the new Mac's keychain,including system.
specify the name of provisioning profile in the project.
I'm not sure if anyone has seen the same thing,but if anyone does,please kindly show me some tips to overcome this,thanks.
The steps you included are for copying/replacing certificates and identities. Provisioning profiles are different.
The provisioning profiles are located under ~/Library/MobileDevice/Provisioning Profiles. Please note these have to be available for the user under which Jenkins is running.
Locate the provisioning profile on your old machine, and copy it to the new. The provisioning profile has a filename <UUID>.mobileprovision. The UUID is the number you see in your error message
Alternatively, launching Xcode on the new machine, and letting it sync with all latest profiles would work too, as long as your run it with Jenkins' user.
Trying to setup jenkins for AdHoc Distribution, tried by using homebrew, mountain lion with xcode 5.
Also tried using Jenkins App
Following is the error returned by jenkins
Code Sign error: No codesigning identities found: No codesigning identities (i.e. certificate and private key pairs)
that match the provisioning profile specified in your build settings (‚xxxxxxx) were found.
Project is getting successfully build using command line and in jenkins if I try for iPhone simulator then also its working fine.
I would like to know any tutorial by which it will be easy to setup jenkins and also please let me know any specific steps needed to give access to keychains.
any help really appreciated.
The core reason is Jenkins is running as daemon mode in Mac, just assume it is a different user - "Jenkins", so it will not have access to the keychain or provision profile as a you login using your credentials, which cause the code signing issue.
I found I have following 2 errors
"Code Sign error: There are no valid certificate/private key pairs in the default keychain"
Solution: Copy your iPhone developer certificate from "login" keychain to "System" keychain.
Detailed steps:
open the "Keychain Access" application, click the login tab, right click the certificate like "iPhone Developer: your_name (XXXXXXX)", choose copy, then click the "System" tab, right click mouse, choose "Paste 2 items"; you might need to do the same thing with the certificate like "iPhone Distribution: your_name".
After doing this, you will get the second error.
"Code Sign error: Provisioning profile 'xxxxx-xxxx-xxxx-xxxxx' can't be found"
Solution: Copy the provision profile to Jenkins user folder.
The provision profile is under in the folder
/YourUserName/Library/MobileDevice/Provisioning Profiles,
for example in my machine, the provision profile files are under /Users/steve/Library/MobileDevice/Provisioning Profiles
In the mac, the Jenkins will be in /Users/Shared/Jenkins, create the following folder:
/Users/Shared/Jenkins/Library/MobileDevice/Provisioning Profile, then copy the .mobileprovision file to this folder.
After doing this, the code signing issues will be fixed. Hope my finding will be helpful to other Jenkins users.
Ref: http://code-dojo.blogspot.com/2012/09/fix-ios-code-signing-issue-when-using.html
Credit: Steve Zhang