Skip to content

Commit

Permalink
Added privacy framework
Browse files Browse the repository at this point in the history
  • Loading branch information
papafe committed Apr 30, 2024
1 parent 2122b58 commit 809dab3
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 1 deletion.
12 changes: 11 additions & 1 deletion wrappers/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,17 @@ set(HEADERS
websocket_cs.hpp
)

set(MANIFESTS
PrivacyInfo.xcprivacy
)

if(${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
add_compile_options(-Wno-missing-prototypes)
endif()

add_compile_options($<$<CXX_COMPILER_ID:MSVC>:/MP>)

add_library(realm-wrappers SHARED ${SOURCES} ${HEADERS})
add_library(realm-wrappers SHARED ${SOURCES} ${HEADERS} ${MANIFESTS})

if(BUILD_APPLE_FRAMEWORK)
set_target_properties(realm-wrappers PROPERTIES
Expand All @@ -54,6 +58,12 @@ if(BUILD_APPLE_FRAMEWORK)
MACOSX_FRAMEWORK_BUNDLE_VERSION "10.0.0"
)

if(TARGETING_CATALYST)
set_source_files_properties(${MANIFESTS} PROPERTIES MACOSX_PACKAGE_LOCATION "Resources")
else()
set_source_files_properties(${MANIFESTS} PROPERTIES MACOSX_PACKAGE_LOCATION "")
endif()

add_custom_command(TARGET realm-wrappers POST_BUILD
COMMENT Compress the build products in case they contain symlinks which NuGet can't handle
COMMAND cd $CONFIGURATION_BUILD_DIR && find $WRAPPER_NAME | zip -9@ --symlinks $WRAPPER_NAME.zip
Expand Down
31 changes: 31 additions & 0 deletions wrappers/src/PrivacyInfo.xcprivacy
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?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>NSPrivacyTrackingDomains</key>
<array/>
<key>NSPrivacyCollectedDataTypes</key>
<array/>
<key>NSPrivacyAccessedAPITypes</key>
<array>
<dict>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>C617.1</string>
</array>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryFileTimestamp</string>
</dict>
<dict>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>E174.1</string>
</array>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryDiskSpace</string>
</dict>
</array>
<key>NSPrivacyTracking</key>
<false/>
</dict>
</plist>

0 comments on commit 809dab3

Please sign in to comment.