@capgo/capgo-skills
Version:
55 agent skills for Capacitor mobile development
43 lines (30 loc) • 890 B
Markdown
Native cookie management by patching `document.cookie` to use native libraries.
**Platforms:** Android, iOS, Web
Bundled with `@capacitor/core`. No separate install needed.
Enable in `capacitor.config.ts` (or `.json`):
```json
{
"plugins": {
"CapacitorCookies": {
"enabled": true
}
}
}
```
iOS 14+ third-party cookies require domain whitelisting via `WKAppBoundDomains` in `ios/App/App/Info.plist` (up to 10 domains).
```typescript
import { CapacitorCookies } from '@capacitor/core';
await CapacitorCookies.setCookie({
url: 'https://example.com',
key: 'token',
value: 'abc123',
});
const cookies = await CapacitorCookies.getCookies({ url: 'https://example.com' });
await CapacitorCookies.deleteCookie({ url: 'https://example.com', key: 'token' });
await CapacitorCookies.clearAllCookies();
```