I have two MAUI Mac Catalyst apps.
According to this guide https://learn.microsoft.com/en-us/dotnet/maui/mac-catalyst/deployment/publish-outside-app-store?view=net-maui-8.0#publish-using-the-command-line
I created certificates, signed Release versions of applications, packed them with pkgbuild
and productbuild
which I also signed with created certificate
They are both signed with same Code Signing key, have same team id. I had set up NSUpdateSecurityPolicy https://developer.apple.com/documentation/bundleresources/information_property_list/nsupdatesecuritypolicy
like this:
Using codesign -dv
I cheked that updater, old and new versions of app share same Team Id and have correct bundle identifiers
After update, updater wants to overwrite old app contents, but it always receives UnathorizedAccessException when touching any file located in application
If my updater app has "App Managment" or "Full disk access" permission in System settings, everything works fine, but user needs to set up it manualy, that is not comfortable, so how can I request this permission? Also according to what I know, application don't need this permission if it's Team ID set up in NSUpdateSecurityPolicy
Maybe I incorrectly set up NSUpdateSecurityPolicy, but I can't notice anything wrong. Also, can it be because I overwrite application using MAUI and C#? Thanks a lot for any answer!
My problem was because of I badly defined NSUpdateSecirityPolicy
, turns out I did not specifed key in dictionary because of picture on https://developer.apple.com/documentation/bundleresources/information_property_list/nsupdatesecuritypolicy
I thought that dictionary must not have a key
NSUpdateSecurityPolicy should look like this
<key>NSUpdateSecurityPolicy</key>
<dict>
<key>AllowPackages</key>
<array>
<string>TEAM_ID</string>
</array>
<key>AllowProcesses</key>
<dict>
<key>TEAM_ID</key>
<array>
<string>com.firm.updater</string>
</array>
</dict>
</dict>