macOS: sandbox application

This commit enables App Sandbox for Jami on macOS.

Folders Migrated:
- App data(accounts, ect)
- Jami cache
- Sparkle cache

Entitlements:
- Access to Movies folder (default recording location)
- Access to Downloads folder (default download location)
- Access to Pictures folder (default screenshots location)
- Camera, microphone, network client/server
- User-selected files

User Impact:
- User preferences will be reset to defaults (theme,
 notifications, download locations)
- Download folder "~/Library/Containers/.../Data/Downloads",
 files will be accessible in "~/Downloads"
- Screenshots folder is "~/Library/Containers/.../Data/Pictures",
files will be accessible in  "~/Pictures"

Change-Id: I5af4e88fc54e0942ad8d4ba53c8bd2f7324d550a
This commit is contained in:
Kateryna Kostiuk
2024-11-19 13:11:45 -05:00
parent 8883d34035
commit e2557293dd
4 changed files with 41 additions and 0 deletions

View File

@@ -991,6 +991,14 @@ else()
set_target_properties(${PROJECT_NAME} PROPERTIES
XCODE_ATTRIBUTE_CODE_SIGN_ENTITLEMENTS "${CMAKE_CURRENT_SOURCE_DIR}/resources/entitlements/appstore/Jami.entitlements")
else()
# Include container-migration.plist in the Resources directory of the app bundle
set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/resources/container-migration.plist" PROPERTIES
MACOSX_PACKAGE_LOCATION "Resources"
)
# Add container-migration.plist to the target
target_sources(${PROJECT_NAME} PRIVATE
"${CMAKE_CURRENT_SOURCE_DIR}/resources/container-migration.plist"
)
set_target_properties(${PROJECT_NAME} PROPERTIES
SPARKLE_URL "${SPARKLE_URL}"
SPARKLE_PUBLIC_KEY "${SPARKLE_PUBLIC_KEY}"