maui-archiver-vscode
maui-archiver-vscode copied to clipboard
Enhancement - IOS: Entitlement.plist
New Command Example: "NET MAUI - Archive : IOS - Add Entitlement.plist"
I have recently moved over to VSCode from VS for MAC and searched for some support in adding the keychain access for the MAUI SecureStorage. in VS For MAC you can easily select Entitlement under the IOS Bundle Signing section. Had to do some research to get this done manually in VSCode. Because it falls together with Publishing, I thought I'd log this enhancement as it will fit nicely with the existing commands.
Action 1:
Create a new Entitlement.plist XML file with Secure Storage example:
- Location & Filename: Create Entitlement.plist in /Platforms/iOS folder.
- File Example to create
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<!-- Allow Debug Secure Storage access, replace {csprojfile.ApplicationId} from your project file and uncomment this section -->
<!-- <key>keychain-access-groups</key>
<array>
<string>$(AppIdentifierPrefix){csprojfile.ApplicationId}</string>
</array> -->
</dict>
</plist>
- Warnings: If the file exist do not take action.
Action 2:
Add the Entitlement section to the project file if it does not exist
- Location & Filename: Open the .csproj file and add a <PropertyGroup> before the </Project> close tag.
- Tag Example
<PropertyGroup Condition="$(TargetFramework.Contains('-ios'))">
<CodesignEntitlements>Platforms\iOS\Entitlements.plist</CodesignEntitlements>
</PropertyGroup>
- Warnings: Tag already exist
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.