From 0e76cfed6f5b0cb4acf674c8feb8b4cccb656e6e Mon Sep 17 00:00:00 2001 From: Trevor Lambert Date: Mon, 5 Aug 2024 14:46:56 -0500 Subject: [PATCH] docs: conform to new plugins protocol --- website/docs/for-super-capacitor/overview.md | 25 +++------- .../tutorials/nav-controller-example.md | 48 ------------------- website/sidebars.js | 6 --- 3 files changed, 6 insertions(+), 73 deletions(-) delete mode 100644 website/docs/for-super-capacitor/tutorials/nav-controller-example.md diff --git a/website/docs/for-super-capacitor/overview.md b/website/docs/for-super-capacitor/overview.md index ef91b16..cd82099 100644 --- a/website/docs/for-super-capacitor/overview.md +++ b/website/docs/for-super-capacitor/overview.md @@ -22,27 +22,10 @@ interface MicroappOptions { modalStyle?: 'fullScreen' | 'pageSheet'; startDir?: string; initialContext?: InitialContext; - plugins?: CapacitorPlugin[]; liveUpdateConfig?: LiveUpdateConfig; } ``` -### CapacitorPlugin - -If you need to use any Capacitor plugins, the classpath of the Android plugins and the Objective-C class name will have to be provided to [`MicroappOptions`](#microappoptions) in the `plugins` property. - -```typescript -interface CapacitorPlugin { - /** The classpath of the plugin to be used in Android. (e.g. com.capacitorjs.plugins.camera.CameraPlugin) */ - androidClassPath: string; - /** The class name of the plugin to be used in iOS. - * This must be the name as it is exposed to the Objective-C runtime. - * For example, The CameraPlugin swift class is exposed to Objective-C as CAPCameraPlugin. - */ - iosClassName: string; -} -``` - ## Methods - [`presentMicroapp(options: MicroappOptions)`](#presentmicroapp) @@ -66,7 +49,7 @@ presentMicroapp({ }); ``` -> **_NOTE:_** A Typescript module resolution Node16, NodeNext, or Bundler is required to recognize Super Capacitor's use of subpath exports. +> **_NOTE:_** A TypeScript module resolution Node16, NodeNext, or Bundler is required to recognize Super Capacitor's use of subpath exports. #### Parameters @@ -88,4 +71,8 @@ import { dismissMicroapp } from '@ionic-enterprise/super-capacitor/microapp'; dismissMicroapp(); ``` -> **_NOTE:_** A Typescript module resolution Node16, NodeNext, or Bundler is required to recognize Super Capacitor's use of subpath exports. +> **_NOTE:_** A TypeScript module resolution Node16, NodeNext, or Bundler is required to recognize Super Capacitor's use of subpath exports. + + +## Plugins +A microapp can only use plugins installed in its superapp. All superapp plugins are automatically available to its microapps. If a microapp requires a plugin not used by its superapp, that plugin must still be installed in the superapp. diff --git a/website/docs/for-super-capacitor/tutorials/nav-controller-example.md b/website/docs/for-super-capacitor/tutorials/nav-controller-example.md deleted file mode 100644 index 5d022aa..0000000 --- a/website/docs/for-super-capacitor/tutorials/nav-controller-example.md +++ /dev/null @@ -1,48 +0,0 @@ -import useBaseUrl from '@docusaurus/useBaseUrl'; - -# Embedding a Root Navigation Controller in Swift Using Storyboard - -By default, Capacitor apps are embedded in a `CAPBridgeViewController`. To utilize the "push" type for presenting microapps, it is necessary to embed the app within a navigation controller. - -## Step 1: Open the Main Storyboard - -1. In the project navigator, locate and open the `Main.storyboard` file. - - - - - -## Step 2: Add a Navigation Controller - -1. Select the Bridge View Controller and locate the Editor section in the menu bar. - -2. Select Editor -> Embed In -> Navigation Controller. This will embed the Bridge View Controller within a navigation controller, as well as set the navigation controller as the initial view controller. - - - - - - - - -## Step 3: Customize the Navigation Controller - -1. To remove the navigation bar, set "Top Bar" to "None" in the Simulated Metrics section of the navigation controller. diff --git a/website/sidebars.js b/website/sidebars.js index 737b387..28c568a 100644 --- a/website/sidebars.js +++ b/website/sidebars.js @@ -251,12 +251,6 @@ module.exports = { items: [ 'for-super-capacitor/overview', 'for-super-capacitor/presentation-types', - { - type: 'category', - label: 'Tutorials', - collapsed: true, - items: ['for-super-capacitor/tutorials/nav-controller-example'], - }, ], },