Reputation: 30396
I'm trying to understand how I need to handle provisioning of my .NET MAUI app because I keep running into issues with HotRestart. I realize some of the issues are due HotRetart bugs but I want to do my part right.
Here's my setup. I do most of my development on a Windows 11 PC and I want to be able to connect my iPhone to my PC via USB and use HotRestart to debug the app while I develop it. I then go to a remote Mac to both test and build my app.
I went through the process of creating a provisioning profile that is specific to the Mac and I have the following in csproj
file:
<PropertyGroup Condition="'$(TargetFramework)'=='net7.0-ios' and '$(Configuration)' == 'Release'">
<RuntimeIdentifier>ios-arm64</RuntimeIdentifier>
<CodesignEntitlement>Entitlements.plist</CodesignEntitlement>
<CodesignKey>iPhone Distribution: My Company, LLC (APPLEASSIGNEDIDHERE)</CodesignKey>
<CodesignProvision>MyiOSProvisioningProfile</CodesignProvision>
</PropertyGroup>
My question is do I need a separate section in my csproj
file for my PC where I want to use my iPhone with Hotrestart to debug the app? If so, what does that look like?
Upvotes: 0
Views: 1483
Reputation: 14639
First of all, the iPhone Distribution
is used in the release mode not the debug mode. So you can remove it.
And then you can apply the HotRestart when debug just follow up the official document about the Deploy an iOS app using hot restart step by step and choose Configure Automatic Provisioning by right-click your iOS project, go to Properties -> Build->iOS Bundle Signing, then select Developer (Automatic) for Signing Identity and the corresponding provisioning profile.
In addition, I see you added <CodesignEntitlement>Entitlements.plist</CodesignEntitlement>
, did you add any capability in your project? If so, you need to config the Provisioning Profile for it and import it into the PC or just pair to Mac when you debug the project.
Upvotes: 0