TeamCity does not see provisioning profiles on MacOS - xamarin

We have set up TeamCity instance on MacOS. Everything works as expected. Only problem we have it TeamCity does not see provisioning profiles:
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/iOS/Xamarin.iOS.Common.targets(606,3): error : The specified iOS provisioning profile 'Test.Development' could not be found [/Library/TeamCity/buildAgent/work/b35069a0a4b41b2a/iOS/Skellig.iOS.csproj]
This is Xamarin application and we have successfully downloaded all certificates and provisioning profiles.

Could it be that one of the certificates or provisioning profiles are missing a private key? Or is the TeamCity instance installed on the same MacOS that the original certificates and provisioning profiles were created on?

Related

Nativescript - where is the production provision files coming from (iOS)

I'm publishing for iOS and confused as to where the provision files coming from.
I deleted all the files from ~/Library/MobileDevice/Provisioning Profiles
I do a build with:
tns publish ios my-apple-id-email my-password --team-id XXXXX
and it seems to work.
Where is it getting the provisioning files from?
Is NS downloading it automatically.
How does it know when one to use.
Production I guess because I'm using a "publish" command.
What if I have multiple prov. profiles on developer.apple.com
Little bit confused...want to make sure I understand how this works.
#dashman with help of this "tns prepare ios --provision" command you will get provision profile detail of that project.
Detail regarding provisional profile is added in "build.xcconfig" file.

jenkins provisioning profile issue

Check dependencies
No iOS profile matching 'Nitin xxxxxxx/xyzCAppStore' found: Xcode couldn't find a profile matching 'Nitin xxxxxxx/xyzCAppStore'. 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.
Code signing is required for product type 'Application' in SDK 'iOS 10.3'
** BUILD FAILED **
The following build commands failed:
Check dependencies
(1 failure)
Build step 'Xcode' marked build as failure
Finished: FAILURE
have tried below things
http://code-dojo.blogspot.in/2012/09/fix-ios-code-signing-issue-when-using.html
https://wiki.jenkins-ci.org/display/JENKINS/Keychains+and+Provisioning+Profiles+Plugin
I have solved same problem by following steps
Switch to your Jenkin Account [Login to your Jenkins Account]
Install all required certificates and provisioning in keychain in Jenkin-Account
Jenkins/Home/workspace or may be different on your Mac [you need to locate the workspace] go to this location.
You will find the Xcode project which is created by Jenkin local server-- Open this Xcode project -- set provisioning and certificates
close the project
open localhost:8080 build your project from Jenkin
jenkins provisioning profile issue will be solved

Import .ProvisionProfile when using Circle.CI and FastLane

For my personal project, I am using Circle.ci to test and deploy the OSX application (with upload hook to S3, to distribute it outside the AppStore - using the signed with Developer ID distribution method). I am using FastLane to build the app, which works flawlessly when building it from my local terminal, but I cannot get past code signing step when using the CI server.
The issue is very simple, the keychain does not import the provision profile, which I can tell from the pre-build step:
1 key imported.
No provisioning profiles found in repository.
You must add a provisioning profile to your repository
to enable CircleCI code-signing support.
Currently installed Code-Signing identities:
Policy: Code Signing
Matching identities
0 identities found
Valid identities only
0 valid identities found
I have my .p12 with private key and certificate uploaded to the repository, no issue there. I have also added the .provisionprofile to the repository (root, even different locations) but to no avail. The documentation states (https://circleci.com/docs/ios-code-signing/) that there is a need for .mobileprovision, but that only covers the iOS, not the OSX, while the system should be nearly identical so I assumed that would work as well.
So the TLDR question is: How do I import the provisioning profile of the OSX distribution on the Circle.CI, so the keychain accepts the entry? Or is there a way around it - like skipping the signing step (disabling it in XCode) and signing it by hand with some .sh?
Thanks everyone!
I am sharing my experience of deploying iOS app to Testflight using CircleCI. Maybe this helps.
Put the provision profile file in the root of your project directory. Make sure it is a normal "Distribution Profile" not a App Store submission profile.
Just add the .p12 key in the project settings of CircleCI. Remove all other certificates / .p12 file from the repository.
I tried using fastlane to build and distribute the build but it was failing in CircleCI. I had these three steps in my Fastfile beta environment.
increment_build_number
gym(scheme: "myScheme”)
pilot
I changed that to just
increment_build_number
My Circle CI file
machine:
environment:
GYM_CODE_SIGNING_IDENTITY: "iPhone Distribution: Company Name (XXXXXX)"
xcode:
version: "8.0"
test:
override:
- set -o pipefail && xcodebuild -workspace 'my.xcworkspace' -scheme 'myscheme' clean build test -sdk iphonesimulator -destination 'id=AC291080-8EFE-4095-8C55-B1E952EFFC36' CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= PROVISIONING_PROFILE=
dependencies:
pre:
- gem update fastlane
deployment:
beta_distribution:
branch: master
commands:
- fastlane beta
- gym --scheme "myscheme" --workspace "my.xcworkspace" --export_method app-store --use_legacy_build_api false
- pilot upload

Why does `ionic run ios` error with "No matching provisioning profile found"?

My goal is to run my Ionic app on my iPhone.
I don't figure out what could be the reason explaining this exception:
myIonicApp$ sudo ionic run ios
Check dependencies
=== BUILD TARGET WealCome OF PROJECT WealCome WITH CONFIGURATION Debug ===
Check dependencies
Code Sign error: No matching provisioning profile found: Your build settings specify a provisioning profile with the UUID “dabcc352-0b59-415a-bcd1-6f6ea1d1fbe6”, however, no such provisioning profile was found.
CodeSign error: code signing is required for product type 'Application' in SDK 'iOS 7.1'
I have this build settings:
The organizer:
As Mik378 said on his comment the right destination path of the provisioning profiles seems to be /Library/MobileDevice so all you have to do is copy everything you need to that folder:
sudo cp -r ~/Library/MobileDevice/ /Library/MobileDevice/
Try going into Xcode preferences, into Accounts and clicking the refresh button at the bottom left of the dialog.

Is there a way of automating the process of refreshing profiles for XCode / XCodeBuild?

I'm setting up a CI build machine and wondering if there is anyway of making sure the machine always has an up to date set of profiles.
If a new device is added to the provisioning portal for example then the CI build will fail until Xcode
/Organizer has its profiles refreshed.
Is there an XCodeBuild command for doing this so that I can automate it (within Jenkins)?
This answer might be helpful, but I haven't implemented it yet:
Command line Update of Provisioning Profiles
For our system, I was just planning on putting the profiles into version control and then running those commands in a prebuild shell script.

Resources