banditoth / maui-archiver-vscode

Visual Studio Code extension for archiving/publishing .NET MAUI applications
MIT License
40 stars 6 forks source link

Enhancement - IOS: SDK Link Behaviour #20

Open EntityBox opened 4 months ago

EntityBox commented 4 months ago

New Command Example: "NET MAUI - Archive : IOS - Change Debug SDK Link Behaviour"

I have recently moved over to VSCode from VS for MAC and searched for some support in changing the SDK Link behaviour. In VS For MAC you can easily select Entitlement under the IOS Build section. Had to do some research to get this done manually in VSCode.

Action:

  1. Ask for Link Behaviours:

    • Dont Link :: None
    • Link Framework SDKs Only :: SdkOnly
    • Link All :: Full
  2. Location & Filename: Open the .csproj file and add a before the close tag. Add the MtouchLink section to the project file if it does not exist, otherwise update the MtouchLink value.

  3. Tag Example

    <PropertyGroup Condition="$(TargetFramework.Contains('-ios')) and '$(Configuration)' == 'Debug'">    
    <MtouchLink>SdkOnly</MtouchLink>
    </PropertyGroup>

    Thanks for the great plugin, using it extensively with all my projects - Hope this can enhance it and does not take too much effort with the samples provided.