Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RNET-1119: Add privacy manifest #3588

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
178 changes: 1 addition & 177 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,180 +46,4 @@ jobs:
version: ${{ needs.build-packages.outputs.package_version }}
needs:
- build-packages
if: always() && !cancelled() && !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled')
test-unity:
uses: ./.github/workflows/test-unity.yml
name: Test
with:
version: ${{ needs.build-packages.outputs.package_version }}
settings: '["Mono-Net4"]'
platform: '[{ "os": "windows", "testPlatform": "Windows64" }, { "os": "linux", "testPlatform": "Linux64" }]'
needs:
- build-packages
- build-unity
if: always() && !cancelled() && !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled')
test-net-framework:
uses: ./.github/workflows/test-net-framework.yml
name: Test
if: always() && !cancelled() && !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled')
needs:
- build-packages
with:
version: ${{ needs.build-packages.outputs.package_version }}
secrets: {}
test-uwp-managed:
uses: ./.github/workflows/test-uwp-managed.yml
name: Test
if: always() && !cancelled() && !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled')
needs:
- build-packages
with:
version: ${{ needs.build-packages.outputs.package_version }}
secrets:
Pfx_Password: ${{ secrets.Pfx_Password }}
Base64_Encoded_Pfx: ${{ secrets.Base64_Encoded_Pfx }}
test-net-core:
if: always() && !cancelled() && !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled')
name: Test
needs:
- build-packages
uses: ./.github/workflows/test-net-core.yml
with:
version: ${{ needs.build-packages.outputs.package_version }}
framework: '["net7.0"]'
test-macos:
uses: ./.github/workflows/test-macos.yml
name: Test
if: always() && !cancelled() && !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled')
needs:
- build-packages
with:
version: ${{ needs.build-packages.outputs.package_version }}
secrets: {}
test-ios:
uses: ./.github/workflows/test-ios.yml
name: Test
if: always() && !cancelled() && !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled')
needs:
- build-packages
with:
version: ${{ needs.build-packages.outputs.package_version }}
secrets: {}
test-tvos:
uses: ./.github/workflows/test-tvos.yml
name: Test
if: always() && !cancelled() && !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled')
needs:
- build-packages
with:
version: ${{ needs.build-packages.outputs.package_version }}
secrets: {}
test-android:
uses: ./.github/workflows/test-android.yml
name: Test
if: always() && !cancelled() && !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled')
needs:
- build-packages
with:
version: ${{ needs.build-packages.outputs.package_version }}
secrets:
AWS_DEVICEFARM_ACCESS_KEY_ID: ${{ secrets.AWS_DEVICEFARM_ACCESS_KEY_ID }}
AWS_DEVICEFARM_SECRET_ACCESS_KEY: ${{ secrets.AWS_DEVICEFARM_SECRET_ACCESS_KEY }}
DEVICEFARM_PROJECT_ARN: ${{ secrets.DEVICEFARM_PROJECT_ARN }}
DEVICEFARM_ANDROID_POOL_ARN: ${{ secrets.DEVICEFARM_ANDROID_POOL_ARN }}
test-weaved-classes:
if: always() && !cancelled() && !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled')
name: Test
needs:
- build-packages
uses: ./.github/workflows/test-woven-classes.yml
with:
version: ${{ needs.build-packages.outputs.package_version }}
test-source-generation:
if: always() && !cancelled() && !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled')
name: Test
uses: ./.github/workflows/test-source-generation.yml
test-weaver:
uses: ./.github/workflows/test-weaver.yml
name: Test
test-code-coverage:
uses: ./.github/workflows/test-code-coverage.yml
name: Test
if: always() && !cancelled() && !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled')
needs:
- build-packages
- deploy-baas
with:
version: ${{ needs.build-packages.outputs.package_version }}
secrets:
BaaSaasApiKey: ${{ secrets.BAASAAS_API_KEY }}
cleanup-baas:
uses: ./.github/workflows/cleanup-baas.yml
if: always()
name: Cleanup
needs:
- deploy-baas
- test-code-coverage
with:
differentiators: '["code-coverage"]'
secrets:
BaaSaasApiKey: ${{ secrets.BAASAAS_API_KEY }}
verify-namespaces:
runs-on: ubuntu-latest
name: Verify Namespaces
needs:
- build-packages
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
submodules: recursive
ref: ${{ github.event.pull_request.head.sha }}
- name: Fetch Realm.PlatformHelpers
uses: actions/download-artifact@v3
with:
name: Realm.PlatformHelpers.${{ needs.build-packages.outputs.package_version }}
path: ${{ github.workspace }}/Realm/packages/
- name: Fetch Realm
uses: actions/download-artifact@v3
with:
name: Realm.${{ needs.build-packages.outputs.package_version }}
path: ${{ github.workspace }}/Realm/packages/
- name: Fetch Realm.UnityUtils
uses: actions/download-artifact@v3
with:
name: Realm.UnityUtils.${{ needs.build-packages.outputs.package_version }}
path: ${{ github.workspace }}/Realm/packages/
- name: Fetch Realm.UnityWeaver
uses: actions/download-artifact@v3
with:
name: Realm.UnityWeaver.${{ needs.build-packages.outputs.package_version }}
path: ${{ github.workspace }}/Realm/packages/
- run: dotnet tool install ilspycmd -g --version 8.0.0.7345
- name: Verify Namespaces
run: |
$isFailure = $false
Get-ChildItem ./Realm/packages -Filter *.nupkg | Foreach-Object {
$targetPath = Join-Path ./Realm/packages $_.BaseName
Expand-Archive $_.FullName -DestinationPath $targetPath

Get-ChildItem $targetPath -Filter *.dll -Recurse | ForEach-Object {
if (-not ($_.FullName -match "runtimes")) {
$ilspyOutput = ilspycmd $_.FullName

$parentDll = $_.FullName

$ilspyOutput | ForEach-Object {
if ($_ -match "namespace.*Realm(\.|$)") {
Write-Output "::error file=$parentDll::Realm present in namespace - $($_)"
Set-Variable "isFailure" -Value $true
}
}
}
}
}

if ($isFailure) {
exit 1
}
shell: pwsh
if: always() && !cancelled() && !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled')
8 changes: 7 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,8 @@ if(BUILD_APPLE_FRAMEWORK)
MACOSX_FRAMEWORK_BUNDLE_VERSION "10.0.0"
)

set_source_files_properties(${MANIFESTS} PROPERTIES MACOSX_PACKAGE_LOCATION "")

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>