mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-25 02:13:00 +08:00
feat(ios): create paywall api (#13602)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - New Features - Introduced a new iOS Paywall plugin with a simple API to display a paywall and receive a success response. - Added JavaScript wrapper and type definitions for easy integration. - Refactor - Reorganized the iOS project structure for plugins. - Chores - Removed unused legacy iOS plugins to streamline the app and reduce build complexity. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
export interface PayWallPlugin {
|
||||
showPayWall(options: {
|
||||
type: string;
|
||||
}): Promise<{ success: boolean; type: string }>;
|
||||
}
|
||||
8
packages/frontend/apps/ios/src/plugins/paywall/index.ts
Normal file
8
packages/frontend/apps/ios/src/plugins/paywall/index.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
import { registerPlugin } from '@capacitor/core';
|
||||
|
||||
import type { PayWallPlugin } from './definitions';
|
||||
|
||||
const PayWall = registerPlugin<PayWallPlugin>('PayWall');
|
||||
|
||||
export * from './definitions';
|
||||
export { PayWall };
|
||||
Reference in New Issue
Block a user