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:
EYHN
2025-04-30 03:28:34 +00:00
parent dcd303c89a
commit d78bb3a139
8 changed files with 40 additions and 7 deletions

View File

@@ -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();