0

I have a azure-devops build pipeline for a xamarin forms application. When it is set to release|iphone it fails with the following error: /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/iOS/Xamarin.iOS.Common.targets(646,3): error : Could not find any available provisioning profiles for iOS.

The build has a valid Apple Enterprise Certificate and Profile that are set as tasks prior to running the release build (and are successful). The same build compiles successfully on my local machine as well as App Center. The build also compiles successfully in the pipeline when I set the build to iPhoneSimulator.

The certificate and profile are in the secure library.

Any suggestions for a next step?

iOS project file snippet:

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' ">
    <DebugType>none</DebugType>
    <Optimize>true</Optimize>
    <OutputPath>bin\iPhone\Release</OutputPath>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
    <MtouchArch>ARM64</MtouchArch>
    <ConsolePause>false</ConsolePause>
    <CodesignKey>iPhone Distribution</CodesignKey>
    <CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
    <CodesignExtraArgs />
    <CodesignResourceRules />
    <IpaPackageDir>$(OutputPath</IpaPackageDir>
    <IpaIncludeArtwork>true</IpaIncludeArtwork>
    <IpaMetadata>iTunesMetadata.plist</IpaMetadata>
    <IpaPackageName>CiteGuide</IpaPackageName>
    <MtouchEnableSGenConc>false</MtouchEnableSGenConc>
    <BuildIpa>true</BuildIpa>
  </PropertyGroup>

1 Answers1

0

You must create a provisioning profile.

But, the secret is: when you create a provisioning profile, you must associate an App ID to this profile, like: "com.companyname.*".

When you create your app in visual studio, you must set in the INFO.PLIST file on IOS PROJECT, the Bundle Identifier to "com.companyname.myapp1" or anything else. If your Bundle Identifier has a name like "com.myapp.app1", you will get this error: Could not find any available provisioning profiles for iOS, because your profile accept only apps with the names started with com.companyname and you are using a appname different.

Also there are quite a few thread which have the same question answered, please go through it and see if it helps.

https://forums.xamarin.com/discussion/128131/error-could-not-find-any-available-provisioning-profiles-for-ios

https://learn.microsoft.com/en-us/xamarin/ios/get-started/installation/device-provisioning/

Could not find any available provisioning profiles for iOS

Mohit Verma
  • 5,140
  • 2
  • 12
  • 27
  • I'm using a wildcard provisioning profile and matches the start of the AppID. The xamarin app builds locally and I can generate an IPA file with it. Moreover, I can do the same from App Center. In both cases, these have been deployed to users. It's only in the case of azure pipelines that it fails. I will take a closer look at the App Center build to see what it is doing that my pipeline build is not. – John Willey Apr 03 '19 at 21:26