How to debug maui ios in real device with free provisioning on mac vs code

jinglian cui 41 Reputation points
2024-11-16T09:05:00.7633333+00:00

I've already using xcode to deploy the native app to my device with this provisioning profile.

Screenshot 2024-11-16 at 17.00.18

Then I've modified the project config as below

	<PropertyGroup Condition="'$(TargetFramework)'=='net8.0-ios'">
	  <ProvisioningType>manual</ProvisioningType>
	  <CodesignKey>Apple Development: ******@qq.com (Q2G8KY2FHS)</CodesignKey>
	</PropertyGroup>


But build failed as this log:

/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk/17.2.8078/tools/msbuild/iOS/Xamarin.Shared.targets(1805,3): error : Could not find any available provisioning profiles for BoxesPlayer on iOS. [/Users/ericcui/Desktop/GitHubWorkspace/BoxesPlayer/src/BoxesPlayer/BoxesPlayer/BoxesPlayer.csproj::TargetFramework=net8.0-ios]
/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk/17.2.8078/tools/msbuild/iOS/Xamarin.Shared.targets(1805,3): error :          [/Users/ericcui/Desktop/GitHubWorkspace/BoxesPlayer/src/BoxesPlayer/BoxesPlayer/BoxesPlayer.csproj::TargetFramework=net8.0-ios]
Developer technologies | .NET | .NET MAUI
Developer technologies | Visual Studio | Extensions
0 comments No comments
{count} votes

Answer accepted by question author
  1. Wenyan Zhang (Shanghai Wicresoft Co,.Ltd.) 36,451 Reputation points Microsoft External Staff
    2024-11-18T05:19:59.2866667+00:00

    Hello,

    You could edit the .csproj file and add the provisioning profile information. For example

    <PropertyGroup Condition="'$(TargetFramework)'=='net8.0-ios'">
    <ProvisioningType>manual</ProvisioningType>
    <CodesignKey>Apple Development: Created via API (XXXXX)</CodesignKey>
    <CodesignProvision>*profile</CodesignProvision>
    </PropertyGroup>
    

    From the screenshot on Xcode, we can see a help button (i), you could click it to see the detailed information. The Signing Certificate Apple Development on Xcode means the CodesignKey on .csproj.

    For more details, you could refer to Free Provisioning for Xamarin.iOS Apps - Xamarin | Microsoft Learn. (This doc is about Xamarin, it applies to MAUI.)

    Best Regards,

    Wenyan Zhang


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.