chore(macos): add entitlements required for squish

And CI parameter to override the default entitlements.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Igor Sirotin 2023-08-08 13:08:21 +03:00 committed by Anastasiya
parent acdd59faed
commit 8cee3f500a
4 changed files with 26 additions and 3 deletions

View File

@ -713,6 +713,7 @@ MACOS_INNER_BUNDLE := $(MACOS_OUTER_BUNDLE)/Contents/Frameworks/QtWebEngineCore.
STATUS_CLIENT_DMG ?= pkg/Status.dmg
$(STATUS_CLIENT_DMG): override RESOURCES_LAYOUT := $(PRODUCTION_PARAMETERS)
$(STATUS_CLIENT_DMG): ENTITLEMENTS ?= resources/Entitlements.plist
$(STATUS_CLIENT_DMG): nim_status_client $(DMG_TOOL)
rm -rf tmp/macos pkg/*.dmg
mkdir -p $(MACOS_OUTER_BUNDLE)/Contents/MacOS
@ -740,7 +741,8 @@ $(STATUS_CLIENT_DMG): nim_status_client $(DMG_TOOL)
# if MACOS_CODESIGN_IDENT is not set then the outer and inner .app
# bundles are not signed
ifdef MACOS_CODESIGN_IDENT
scripts/sign-macos-pkg.sh $(MACOS_OUTER_BUNDLE) $(MACOS_CODESIGN_IDENT) --entitlements Entitlements.plist
scripts/sign-macos-pkg.sh $(MACOS_OUTER_BUNDLE) $(MACOS_CODESIGN_IDENT) \
--entitlements $(ENTITLEMENTS)
endif
echo -e $(BUILD_MSG) "dmg"
mkdir -p pkg

View File

@ -31,6 +31,11 @@ pipeline {
description: 'Decides whether the mocked status-keycard-go library is built.',
defaultValue: false
)
choice(
name: 'ENTITLEMENTS',
description: 'Select app entitlements. Squish requires extra entitlements.',
choices: ['resources/Entitlements.plist', 'resources/Entitlements_squish.plist']
)
}
options {

View File

@ -4,9 +4,11 @@
<dict>
<key>com.apple.security.device.camera</key>
<true/>
<!-- <key>com.apple.developer.associated-domains</key>
<!--
<key>com.apple.developer.associated-domains</key>
<array>
<string>applinks:status.app</string>
</array> -->
</array>
-->
</dict>
</plist>

View File

@ -0,0 +1,14 @@
<?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>
<key>com.apple.security.device.camera</key>
<true/>
<key>com.apple.security.cs.allow-dyld-environment-variables</key>
<true/>
<key>com.apple.security.cs.disable-library-validation</key>
<true/>
<key>com.apple.security.cs.allow-jit</key>
<true/>
</dict>
</plist>