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: XXXXi@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]
.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,767 questions
Visual Studio Extensions
Visual Studio Extensions
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Extensions: A program or program module that adds functionality to or extends the effectiveness of a program.
235 questions
0 comments No comments
{count} votes

Accepted answer
  1. Wenyan Zhang (Shanghai Wicresoft Co,.Ltd.) 33,676 Reputation points Microsoft Vendor
    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 Answers by the question author, which helps users to know the answer solved the author's problem.