I'm using JetBrains Rider to do .NET MAUI development on macOS Sonoma (14.6.1) as VS Code is broken for me.
My goal is to complete a Mac App test of a multi-platform app I've been working on. It successfully builds and launches in iOS and Android simulators/emulators and works on my test iPhone and Android phone. However, it will not launch as a Mac catalyst app. Every time I get an error that Xamarin.Shared.targets(1834,3):
cannot find any available provisioning profiles for the app. I've gone through the provisioning process, deleting and remaking the Certificates, App ID, and Profiles in my developer dashboard. I made one for macOS and one for iOS with Mac enabled as well. I've downloaded, installed, uninstalled, and redownloaded and installed. I'm not sure what I'm missing and .NET MAUI's documentation for this is very poor. Happy to share my csproj code below to get some help and provide logs or screenshots as needed. I checked Xcode and there's three signing certificates there as well.
Here's the relevant portions of CSProj:
<!-- Debug Configuration for iOS -->
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)' == 'Debug|net9.0-ios'">
<CodesignKey>key is here</CodesignKey>
<CodesignProvision>Automatic</CodesignProvision>
<BuildIpa>true</BuildIpa>
</PropertyGroup>
<!-- Release Configuration for iOS -->
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)' == 'Release|net9.0-ios'">
<CodesignKey>key is here</CodesignKey>
<CodesignProvision>Automatic</CodesignProvision>
<BuildIpa>true</BuildIpa>
</PropertyGroup>
<!-- Debug Configuration for Mac Catalyst -->
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)' == 'Debug|net9.0-maccatalyst'">
<CodesignKey>key is here</CodesignKey>
<CodesignProvision>Automatic</CodesignProvision>
</PropertyGroup>
<!-- Release Configuration for Mac Catalyst -->
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)' == 'Release|net9.0-maccatalyst'">
<CodesignKey>key is here</CodesignKey>
<CodesignProvision>Automatic</CodesignProvision>
</PropertyGroup>
So a few more hours and I figured out what I needed to do to get it up and running. For those who need to get this working, there's a number of detailed steps that I will mention here but more details are actually found in the documentation, albeit if you are newer to this kind of thing like me, you may not find the wording of the title confusing: enter link description here
In summary:
<!-- Release Configuration for Mac Catalyst -->
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net8.0-maccatalyst|AnyCPU'">
<MtouchLink>SdkOnly</MtouchLink>
<EnableCodeSigning>True</EnableCodeSigning>
<CreatePackage>true</CreatePackage>
<CodesignKey>Step 3 Goes Here</CodesignKey>
<CodesignProvision>ProvisioningProfileHere</CodesignProvision>
<CodesignEntitlements>Platforms\MacCatalyst\Entitlements.plist</CodesignEntitlements>
<UseHardenedRuntime>true</UseHardenedRuntime>
</PropertyGroup>