简体   繁体   中英

Build Failures for Xamarin iOS release

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>

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://docs.microsoft.com/en-us/xamarin/ios/get-started/installation/device-provisioning/

Could not find any available provisioning profiles for iOS

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM