I\'m trying to build my application using jenkins pipeline using shell command. Below is the command i\'m using to build the app.
sh \'xcodebuild -workspace proj
For my case, the reason I got this error is because I changed the team manually on my machine and accidentally pushed the changes onto the remote, which cause the Jenkins build failed, but even after I change the team back Jenkins keep failing, after diffing a lot, I found out that CODE_SIGN_IDENTITY
filed inside project.pbxproj
file has to be CODE_SIGN_IDENTITY = "iPhone Distribution";
other than ="Apple Development"
hope it helps.
Had this problem as well on one Jenkins build slave dedicated to building one specific app (for iOS and Android). The Mac was on Mojave and Xcode 10.1
The fix appeared to be logging on to the Mac, and exporting the archive created by Jenkins using the Xcode UI, not xcodebuild. After doing that, the next Jenkins build when through without a problem. I say appeared to be because I didn't do anything else to the Jenkins job or the slave, and it had been failing consistently before that. Seems odd, but there you have it.
This specific problem didn't occur on build slaves building other apps, but these other slaves, while using Xcode 10.1, were on High Sierra. We have had other odd behaviors on all iOS builds since Apple merged Apple Developer and App Store Connect, however.
I have had a similar problem for weeks. Since updating to Xcode 10 every aspect of the build Jenkins did would be successful except I would get that error and the build would fail. Directly building, signing, etc. in Xcode was fine.
The solution in my case was the Xcode 10.1 update. The errors you list still exist in the Jenkins output. However it no longer causes Jenkins to fail the build.
Sadly I don't actually know what caused the failure so I don't have any further insight.
This helped fix the problem with Jenkins running a slave with ssh:
Source: https://forums.developer.apple.com/thread/112606