Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

feat(ios): add apis for native (#9536)

EYHN7514ccd45225
diff --git a/packages/frontend/apps/ios/src/app.tsx b/packages/frontend/apps/ios/src/app.tsx
index 90ba46a01e..00063ef990 100644
--- a/packages/frontend/apps/ios/src/app.tsx
+++ b/packages/frontend/apps/ios/src/app.tsx
@@ -149,6 +149,14 @@ const frameworkProvider = framework.provider();
(window as any).getCurrentI18nLocale = () => {
return I18n.language;
};
+(window as any).getCurrentWorkspaceId = () => {
+ const globalContextService = frameworkProvider.get(GlobalContextService);
+ return globalContextService.globalContext.workspaceId.get();
+};
+(window as any).getCurrentDocId = () => {
+ const globalContextService = frameworkProvider.get(GlobalContextService);
+ return globalContextService.globalContext.docId.get();
+};
(window as any).getCurrentDocContentInMarkdown = async () => {
const globalContextService = frameworkProvider.get(GlobalContextService);
const currentWorkspaceId =