mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 21:05:19 +00: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:
@@ -53,6 +53,7 @@ import { Keyboard, KeyboardStyle } from '@capacitor/keyboard';
|
||||
import { Framework, FrameworkRoot, getCurrentStore } from '@toeverything/infra';
|
||||
import { OpClient } from '@toeverything/infra/op';
|
||||
import { AsyncCall } from 'async-call-rpc';
|
||||
import { AppTrackingTransparency } from 'capacitor-plugin-app-tracking-transparency';
|
||||
import { useTheme } from 'next-themes';
|
||||
import { Suspense, useEffect } from 'react';
|
||||
import { RouterProvider } from 'react-router-dom';
|
||||
@@ -377,6 +378,10 @@ CapacitorApp.addListener('appUrlOpen', ({ url }) => {
|
||||
console.error(e);
|
||||
});
|
||||
|
||||
AppTrackingTransparency.requestPermission().catch(e => {
|
||||
console.error('Failed to request app tracking transparency permission', e);
|
||||
});
|
||||
|
||||
const KeyboardThemeProvider = () => {
|
||||
const { resolvedTheme } = useTheme();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user