mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-25 14:28:51 +08:00
feat(ios): add app tracking transparency permission (#12078)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added support for App Tracking Transparency, including requesting user permission at runtime and providing a clear privacy usage description. - **Dependency Updates** - Updated the "apollo-ios" package to version 1.20.0. - Added the "capacitor-plugin-app-tracking-transparency" package and its related pod dependency. - **Localization** - Added a new localized privacy usage description for tracking permission requests. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -78,6 +78,8 @@
|
|||||||
/* Begin PBXFileSystemSynchronizedRootGroup section */
|
/* Begin PBXFileSystemSynchronizedRootGroup section */
|
||||||
C45499AB2D140B5000E21978 /* NBStore */ = {
|
C45499AB2D140B5000E21978 /* NBStore */ = {
|
||||||
isa = PBXFileSystemSynchronizedRootGroup;
|
isa = PBXFileSystemSynchronizedRootGroup;
|
||||||
|
exceptions = (
|
||||||
|
);
|
||||||
path = NBStore;
|
path = NBStore;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
};
|
};
|
||||||
@@ -326,13 +328,9 @@
|
|||||||
);
|
);
|
||||||
inputFileListPaths = (
|
inputFileListPaths = (
|
||||||
);
|
);
|
||||||
inputPaths = (
|
|
||||||
);
|
|
||||||
name = "[CP] Embed Pods Frameworks";
|
name = "[CP] Embed Pods Frameworks";
|
||||||
outputFileListPaths = (
|
outputFileListPaths = (
|
||||||
);
|
);
|
||||||
outputPaths = (
|
|
||||||
);
|
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
shellPath = /bin/sh;
|
shellPath = /bin/sh;
|
||||||
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-AFFiNE/Pods-AFFiNE-frameworks.sh\"\n";
|
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-AFFiNE/Pods-AFFiNE-frameworks.sh\"\n";
|
||||||
|
|||||||
+2
-2
@@ -5,8 +5,8 @@
|
|||||||
"kind" : "remoteSourceControl",
|
"kind" : "remoteSourceControl",
|
||||||
"location" : "https://github.com/apollographql/apollo-ios",
|
"location" : "https://github.com/apollographql/apollo-ios",
|
||||||
"state" : {
|
"state" : {
|
||||||
"revision" : "4d0845f9f2901ed657d680c874ffc68d12704cd4",
|
"revision" : "51e535dcf5439c01396d668a9598748ea86c7c1a",
|
||||||
"version" : "1.19.0"
|
"version" : "1.20.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -48,6 +48,18 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"NSUserTrackingUsageDescription" : {
|
||||||
|
"comment" : "Privacy - Tracking Usage Description",
|
||||||
|
"extractionState" : "manual",
|
||||||
|
"localizations" : {
|
||||||
|
"en" : {
|
||||||
|
"stringUnit" : {
|
||||||
|
"state" : "translated",
|
||||||
|
"value" : "Rest assured, enabling this permission won't access your private info on other sites. It's only used to identify your device and improve security and product experience."
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"version" : "1.0"
|
"version" : "1.0"
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ def capacitor_pods
|
|||||||
pod 'CapacitorBrowser', :path => '../../../../../node_modules/@capacitor/browser'
|
pod 'CapacitorBrowser', :path => '../../../../../node_modules/@capacitor/browser'
|
||||||
pod 'CapacitorHaptics', :path => '../../../../../node_modules/@capacitor/haptics'
|
pod 'CapacitorHaptics', :path => '../../../../../node_modules/@capacitor/haptics'
|
||||||
pod 'CapacitorKeyboard', :path => '../../../../../node_modules/@capacitor/keyboard'
|
pod 'CapacitorKeyboard', :path => '../../../../../node_modules/@capacitor/keyboard'
|
||||||
|
pod 'CapacitorPluginAppTrackingTransparency', :path => '../../../../../node_modules/capacitor-plugin-app-tracking-transparency'
|
||||||
end
|
end
|
||||||
|
|
||||||
target 'AFFiNE' do
|
target 'AFFiNE' do
|
||||||
|
|||||||
@@ -10,6 +10,8 @@ PODS:
|
|||||||
- Capacitor
|
- Capacitor
|
||||||
- CapacitorKeyboard (7.0.1):
|
- CapacitorKeyboard (7.0.1):
|
||||||
- Capacitor
|
- Capacitor
|
||||||
|
- CapacitorPluginAppTrackingTransparency (2.0.5):
|
||||||
|
- Capacitor
|
||||||
- CryptoSwift (1.8.3)
|
- CryptoSwift (1.8.3)
|
||||||
|
|
||||||
DEPENDENCIES:
|
DEPENDENCIES:
|
||||||
@@ -19,6 +21,7 @@ DEPENDENCIES:
|
|||||||
- "CapacitorCordova (from `../../../../../node_modules/@capacitor/ios`)"
|
- "CapacitorCordova (from `../../../../../node_modules/@capacitor/ios`)"
|
||||||
- "CapacitorHaptics (from `../../../../../node_modules/@capacitor/haptics`)"
|
- "CapacitorHaptics (from `../../../../../node_modules/@capacitor/haptics`)"
|
||||||
- "CapacitorKeyboard (from `../../../../../node_modules/@capacitor/keyboard`)"
|
- "CapacitorKeyboard (from `../../../../../node_modules/@capacitor/keyboard`)"
|
||||||
|
- CapacitorPluginAppTrackingTransparency (from `../../../../../node_modules/capacitor-plugin-app-tracking-transparency`)
|
||||||
- CryptoSwift (~> 1.8.3)
|
- CryptoSwift (~> 1.8.3)
|
||||||
|
|
||||||
SPEC REPOS:
|
SPEC REPOS:
|
||||||
@@ -38,6 +41,8 @@ EXTERNAL SOURCES:
|
|||||||
:path: "../../../../../node_modules/@capacitor/haptics"
|
:path: "../../../../../node_modules/@capacitor/haptics"
|
||||||
CapacitorKeyboard:
|
CapacitorKeyboard:
|
||||||
:path: "../../../../../node_modules/@capacitor/keyboard"
|
:path: "../../../../../node_modules/@capacitor/keyboard"
|
||||||
|
CapacitorPluginAppTrackingTransparency:
|
||||||
|
:path: "../../../../../node_modules/capacitor-plugin-app-tracking-transparency"
|
||||||
|
|
||||||
SPEC CHECKSUMS:
|
SPEC CHECKSUMS:
|
||||||
Capacitor: 106e7a4205f4618d582b886a975657c61179138d
|
Capacitor: 106e7a4205f4618d582b886a975657c61179138d
|
||||||
@@ -46,8 +51,9 @@ SPEC CHECKSUMS:
|
|||||||
CapacitorCordova: 5967b9ba03915ef1d585469d6e31f31dc49be96f
|
CapacitorCordova: 5967b9ba03915ef1d585469d6e31f31dc49be96f
|
||||||
CapacitorHaptics: 70e47470fa1a6bd6338cd102552e3846b7f9a1b3
|
CapacitorHaptics: 70e47470fa1a6bd6338cd102552e3846b7f9a1b3
|
||||||
CapacitorKeyboard: 969647d0ca2e5c737d7300088e2517aa832434e2
|
CapacitorKeyboard: 969647d0ca2e5c737d7300088e2517aa832434e2
|
||||||
|
CapacitorPluginAppTrackingTransparency: 2a2792623a5a72795f2e8f9ab3f1147573732fd8
|
||||||
CryptoSwift: 967f37cea5a3294d9cce358f78861652155be483
|
CryptoSwift: 967f37cea5a3294d9cce358f78861652155be483
|
||||||
|
|
||||||
PODFILE CHECKSUM: bd61c17ff51f31ae55ec8dc579da83fda7bb51cb
|
PODFILE CHECKSUM: 2c1e4be82121f2d9724ecf7e31dd14e165aeb082
|
||||||
|
|
||||||
COCOAPODS: 1.16.2
|
COCOAPODS: 1.16.2
|
||||||
|
|||||||
@@ -30,6 +30,7 @@
|
|||||||
"@sentry/react": "^9.2.0",
|
"@sentry/react": "^9.2.0",
|
||||||
"@toeverything/infra": "workspace:^",
|
"@toeverything/infra": "workspace:^",
|
||||||
"async-call-rpc": "^6.4.2",
|
"async-call-rpc": "^6.4.2",
|
||||||
|
"capacitor-plugin-app-tracking-transparency": "^2.0.5",
|
||||||
"idb": "^8.0.0",
|
"idb": "^8.0.0",
|
||||||
"next-themes": "^0.4.4",
|
"next-themes": "^0.4.4",
|
||||||
"react": "^19.0.0",
|
"react": "^19.0.0",
|
||||||
|
|||||||
@@ -53,6 +53,7 @@ import { Keyboard, KeyboardStyle } from '@capacitor/keyboard';
|
|||||||
import { Framework, FrameworkRoot, getCurrentStore } from '@toeverything/infra';
|
import { Framework, FrameworkRoot, getCurrentStore } from '@toeverything/infra';
|
||||||
import { OpClient } from '@toeverything/infra/op';
|
import { OpClient } from '@toeverything/infra/op';
|
||||||
import { AsyncCall } from 'async-call-rpc';
|
import { AsyncCall } from 'async-call-rpc';
|
||||||
|
import { AppTrackingTransparency } from 'capacitor-plugin-app-tracking-transparency';
|
||||||
import { useTheme } from 'next-themes';
|
import { useTheme } from 'next-themes';
|
||||||
import { Suspense, useEffect } from 'react';
|
import { Suspense, useEffect } from 'react';
|
||||||
import { RouterProvider } from 'react-router-dom';
|
import { RouterProvider } from 'react-router-dom';
|
||||||
@@ -377,6 +378,10 @@ CapacitorApp.addListener('appUrlOpen', ({ url }) => {
|
|||||||
console.error(e);
|
console.error(e);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
AppTrackingTransparency.requestPermission().catch(e => {
|
||||||
|
console.error('Failed to request app tracking transparency permission', e);
|
||||||
|
});
|
||||||
|
|
||||||
const KeyboardThemeProvider = () => {
|
const KeyboardThemeProvider = () => {
|
||||||
const { resolvedTheme } = useTheme();
|
const { resolvedTheme } = useTheme();
|
||||||
|
|
||||||
|
|||||||
@@ -684,6 +684,7 @@ __metadata:
|
|||||||
"@types/react": "npm:^19.0.1"
|
"@types/react": "npm:^19.0.1"
|
||||||
"@types/react-dom": "npm:^19.0.2"
|
"@types/react-dom": "npm:^19.0.2"
|
||||||
async-call-rpc: "npm:^6.4.2"
|
async-call-rpc: "npm:^6.4.2"
|
||||||
|
capacitor-plugin-app-tracking-transparency: "npm:^2.0.5"
|
||||||
cross-env: "npm:^7.0.3"
|
cross-env: "npm:^7.0.3"
|
||||||
idb: "npm:^8.0.0"
|
idb: "npm:^8.0.0"
|
||||||
next-themes: "npm:^0.4.4"
|
next-themes: "npm:^0.4.4"
|
||||||
@@ -17993,6 +17994,15 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
"capacitor-plugin-app-tracking-transparency@npm:^2.0.5":
|
||||||
|
version: 2.0.5
|
||||||
|
resolution: "capacitor-plugin-app-tracking-transparency@npm:2.0.5"
|
||||||
|
peerDependencies:
|
||||||
|
"@capacitor/core": ">= 3.0.0"
|
||||||
|
checksum: 10/dc43c3f7e3241067ef960416a53681b44ecf9ac9c9e22aef3a4fe81afd692bc466fe517cf85a260cf1b0ad4e7f8c961ad2660485ff5fb0bdee74f42ad660e4e2
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
"capital-case@npm:^1.0.4":
|
"capital-case@npm:^1.0.4":
|
||||||
version: 1.0.4
|
version: 1.0.4
|
||||||
resolution: "capital-case@npm:1.0.4"
|
resolution: "capital-case@npm:1.0.4"
|
||||||
|
|||||||
Reference in New Issue
Block a user