TeamCity 8 xcode 5 agent code sign error - ios

I am trying to run Xcode using TeamCity but I am getting a Code Sign error. Even though the provision profile and certificate exists on my machine. I can build it on my iPhone. This is the error I am getting:
Step 1/1: Xcode Project [09:36:16][Step 1/1] PRAnalytics (CLEAN)
[09:36:16][PRAnalytics (CLEAN)] [BEROR]Code Sign error: No matching
provisioning profile found: Your build settings specify a provisioning
profile with the UUID “8A7A8B79-####-####-####-C39537A6A156”, however,
no such provisioning profile was found.
[09:36:16][PRAnalytics (CLEAN)] [BEROR]CodeSign error: code signing is
required for product type 'Application' in SDK 'iOS 7.1'
[09:36:16][Step 1/1] Code Sign error: No matching provisioning profile
found: Your build settings specify a provisioning profile with the
UUID “8A7A8B79-####-####-####-C39537A6A156”, however, no such
provisioning profile was found.
[09:36:16][Step 1/1] CodeSign error: code signing is required for
product type 'Application' in SDK 'iOS 7.1'
[09:36:16][Step 1/1] Step Xcode Project failed

I was able to solve this issue, which was due to two main reasons, Xcode when invoked from teamcity looks its resources from the System & not the user, so to fix at least get sure that you did the following:-
1-Ensure the project is building successfully from Xcode to real target.
-In KeyChain
2-Copy all the development certificates & credentials form your user folder to the system folder
3-Copy all the Provisioning profiles existing in
Users//Library/MobileDevice/Provisioning Profiles
to
System/Library/MobileDevice/Provisioning Profiles
Create the missing folders if they don’t exist below 'Library'

Finally figured out. My agent was in HD/AGENT. When i moved it to HD/USER/DESKTOP/AGENT, it began to work. Seems like Agent should be in the USER directory.

Have you checked build settings properly. Check your plist for identifier. And provisioning profile and code signing settings in Build settings. Make sure you are setting right provisioning and certificate.

Related

ITMS-90174: "Missing Provisioning Profile - Apps must contain a provisioning profile in a file named embedded.mobileprovision." on uploading flutter

I built a flutter app and am struggling to upload ipa file for testflight now. I built ipa file with following steps:
$ flutter build ios -t lib/main_stg.dart
Get Runner.app from step 1
Create ProjectName folder and put the app file in it
Zip ProjectName folder and rename it ProjectName.ipa
$ xcrun altool --upload-app -f ProjectName.ipa -t ios -u username -p pass
Then got the error after step 5.
*** Error: Error uploading 'ProjectName.ipa'.
*** Error: ERROR ITMS-90174: "Missing Provisioning Profile - Apps must contain a provisioning profile in a file named embedded.mobileprovision." (-18000)
I saw below page and changed "New build system" to "Legacy Build System" at Build System, but am still getting the same error:
Missing Provisioning Profile :Apps must contain a provisioning profile in a file named embedded.mobileprovision
I checked the contents of Runner.app generated at step 2 and found "embedded.mobileprovision" there. However not sure where to check for provisioning profile and how to add it if its missing.
I'm using MacOS Big sur, xcode 12.5.1, flutter 2.3.0-17.0.
You can check the Provisioning profile in Xcode like image below
I'm using Fastlane which will handle sharing provisioning profiles to your team but anyways You can go check in Xcode to see if you download and install provisioning profile correctly. If it's correct it shouldn't show any warning or errors
After reading Einzeln's answer, I checked xcode settings.
Firstly, I unticked "Automatically manage signing" and noticed similar error message "Provisioning profile xxx doesn't include signing certiicate" at "Signing Certificate" part.
I added "Apple Distribution" in Xcode->Preferences->Manage Certificates. Then added profile with "Apple Distribution" in Apple Developer Portal. At this stage (or rebooted mac was necessary?) error message was gone on xcode.
I still got the same error with xcrun command somehow. However, building from xcode GUI worked this time(It didn't work before so I decided to use command. probably because Provisioning Profile wasn't set). Then build the app->distribute done successfully.

No matching provisioning profiles found - NativeScript iOS deploy

I want to publish an update of my NativeScript app into AppStore. Until yesterday the following steps worked:
move into app directory (from Terminal)
execute tns publish ios
enter valid e-mail & password combination
Now I need to do another update, but I keep getting the following error:
=== BUILD TARGET HandyApp OF PROJECT HandyApp WITH CONFIGURATION Release ===
Check dependencies
Code Sign error: No matching provisioning profiles found: No provisioning profiles matching an applicable signing identity were found.
** ARCHIVE FAILED **
The following build commands failed:
Check dependencies
(1 failure)
Command xcodebuild failed with exit code 65
# publish ios
I am working under Xcode 7.3. I checked my iPhone Developer certificate in Xcode and in my keychain, it is active and not expired. The Provisioning Profile is shown in Xcode. I ensured to use the certificate that is saved in apple.developer.com (by downloading it and replacing the old one in that directory).
I got:
my .mobileprovision
my .cer
my .p12
everything in the same directory.
Still there seems something not to be matching. I just can't figure out what might be running wrong. Does anyone know what else I could try to get it working?

Phonegap build Error code 65

I am using adobe phone gap build (https://build.phonegap.com) and i get this error:
=== BUILD TARGET Firstapp OF PROJECT Firstapp WITH CONFIGURATION Release ===
Check dependencies Provisioning profile "iOS Team Provisioning
Profile: com.OgonLabs.test2" is Xcode managed, but signing settings
require a manually managed profile. Code signing is required for
product type 'Application' in SDK 'iOS 10.1'
** ARCHIVE FAILED **
The following build commands failed: Check dependencies (1 failure)
Error code 65 for command: xcodebuild with args:
-xcconfig,/private/project/cordova/build-release.xcconfig,-workspace,Firstapp.xcworkspace,-scheme,Firstapp,-configuration,Release,-destination,generic/platform=iOS,-archivePath,Firstapp.xcarchive,archive,CONFIGURATION_BUILD_DIR=/private/project/build/device,SHARED_PRECOMPS_DIR=/private/project/build/sharedpch
I generate my .p12 certificate and then I make an app with id = "com.myCompany.test2" in Xcode and i generate provisioning profile. The same id has phonegap app. Any solution?
Remove another account added in your Xcode After that build with latest Provisioning Profile. and also check download all latest profile and certificate from xcode->windows->organizer->select account and download all certificate.

Attempting to install the Release version on my device gets conflict profiles

I am trying to install the Release version of my app on my device to test it.
When I select the Edit > Scheme and under RUN I choose "Release" for Build Configuration
But I get the error:
My App has conflicting provisioning settings. My App is automatically
signed for development, but a conflicting code signing identity iPhone
Distribution has been manually specified. Set the code signing
identity value to "iPhone Developer" in the build settings editor, or
switch to manual signing in the project editor. Code signing is
required for product type 'Application' in SDK 'iOS 10.2'
I have gone to Code Signing and Ensured that my release is my iOS Distribution
I have deleted all my profile, certs and re-imported. I have cleaned the build. I have removed my account.
When I switch to Manual Signing I get the error:
No signing certificate "iOS Distribution" found
No "iOS Distribution" signing certificate matching team ID "XXXXXXXXXX" with a private key was found.
But it is in my KeyChain.
I'm so frustrated. Has anyone else solved this?
You're supposed to use the iOS developer profile when running builds on your device. You can build in release mode still. However you can't install distribution signed binaries through Xcode.
You can create an ad-hoc profile to test push notification for the release build. It is same as the distribution build.

Provisioning profile not getting set while building Xcode project using Jenkins

I am connecting to gitlab to pull source code and build the app through Jenkins. At build time, i am changing the bundle ID, certificate and provisioning profile for the App. But for some reason, the provisioning profile is not getting set while the former two works perfectly. I have added the profiles in KISS plugin and also provided the path to the profile in the Xcode plugin.
I have configured as below
I am getting the following error while building the App
App requires a provisioning profile. Select a provisioning profile for the "Release" build configuration in the project editor.
Code signing is required for product type 'Application' in SDK 'iOS 10.0'
Attaching the console screenshot

Resources