### Install Dependencies and Run Source: https://developer.adobe.com/express/embed-sdk/docs/guides/tutorials/getting-started Install project dependencies and start the development server using npm commands. ```bash npm install ``` ```bash npm run start ``` -------------------------------- ### Install dependencies and start development server Source: https://developer.adobe.com/express/embed-sdk/docs/guides/tutorials/mobile-web Run these commands in the Mobile-web directory to prepare the environment and launch the server on port 5566. ```bash npm install npm run gen:cert npm run dev ``` -------------------------------- ### Start From Content Configuration Properties Source: https://developer.adobe.com/express/embed-sdk/docs/v4/shared/src/types/module/app-config-types/interfaces/preview-mode-config Configuration properties for initializing the Start From Content module. ```APIDOC ## Start From Content Configuration ### Description Configuration object properties for the Start From Content module. ### Parameters #### Request Body - **headerText** (string) - Optional - The text to be displayed in the header of the Start From Content module. Default is an empty string. - **launchMode** ("preview") - Required - Launch mode for Start From Content. Must be set to 'preview' to enable direct preview mode. - **assetId** (string) - Required - The ID of the asset to preview directly. Currently supports templates only. ``` -------------------------------- ### Open Start From Content Module Source: https://developer.adobe.com/express/embed-sdk/docs/v4/sdk/src/workflows/3p/module-workflow/classes/module-workflow Use this method to open the Start From Content module. Optional parameters can configure image generation, export options, and the SDK container. ```typescript startFromContent( appConfig?, exportConfig?, containerConfig? ): void; ``` -------------------------------- ### Full iOS Example - ViewController Setup Source: https://developer.adobe.com/express/embed-sdk/docs/guides/concepts/mobile-web-support-webview This Swift code sets up a ViewController for embedding a WKWebView. It configures the web view with custom settings and assigns navigation and UI delegates. Ensure `getWebviewConfig()` and `setCustomUserAgent(for:)` are implemented elsewhere. ```swift import UIKit import WebKit class ViewController: UIViewController, WKNavigationDelegate, WKUIDelegate { var newWebviewPopupWindow: WKWebView? @IBOutlet weak var loadButton: UIButton! @IBOutlet weak var footerView: UIView! lazy var webView: WKWebView = { let webViewConfig = getWebviewConfig() let webView = WKWebView( frame: .zero, configuration: webViewConfig ) webView.navigationDelegate = self webView.uiDelegate = self self.setCustomUserAgent(for: webView) ``` -------------------------------- ### startFromContent() Source: https://developer.adobe.com/express/embed-sdk/docs/v4/sdk/src/workflows/3p/module-workflow-types/interfaces/module-workflow Opens the Start From Content module. ```APIDOC ## startFromContent() ### Description Opens the Start From Content module to allow users to begin a project from existing content. ### Parameters - **appConfig** (Object) - Optional - **exportConfig** (ExportOptions) - Optional - **containerConfig** (ContainerConfig) - Optional ### Returns - **void** ``` -------------------------------- ### Initialize and start the Template Browser Source: https://developer.adobe.com/express/embed-sdk/docs/guides/concepts/browse-template Initializes the SDK and triggers the template browsing workflow using the startFromContent method. ```javascript await import("https://cc-embed.adobe.com/sdk/v4/CCEverywhere.js"); const { module } = await window.CCEverywhere.initialize( { clientId: "your-client-id", appName: "your-app-name" }, {} ); module.startFromContent({ /* ... */ }); ``` -------------------------------- ### Clone Embed SDK Edit Image Sample Source: https://developer.adobe.com/express/embed-sdk/docs/guides/tutorials/edit-image Clone the sample project from GitHub to start your integration. Navigate to the project directory after cloning. ```bash git clone https://github.com/AdobeDocs/embed-sdk-samples.git cd embed-sdk-samples/code-samples/tutorials/embed-sdk-edit-image ``` -------------------------------- ### Browse Mode Configuration Source: https://developer.adobe.com/express/embed-sdk/docs/v4/shared/src/types/module/app-config-types/interfaces/browse-mode-config Configuration options for the 'Start From Content' browse mode. ```APIDOC ## Browse Mode Configuration Options ### Description These options configure the 'Start From Content' browse mode within the Adobe Express Embed SDK. ### Parameters #### Query Parameters - **launchMode?** (string) - Optional - Launch mode for Start From Content. Default: 'browse'. Possible values: 'browse'. - **categoriesConfig** (Array) - Required - Configuration for browse search functionality. Can be configured for templates or photos based on the category. Browse mode needs category to show assets. - **searchQuery?** (string) - Optional - Search Query to be used to search across all browse search categories. Default: empty string. - **hideSearchBar?** (boolean) - Optional - Property to hide the search bar in the Browse Search. Default: false. ``` -------------------------------- ### Clone Embed SDK Generate Image Sample Source: https://developer.adobe.com/express/embed-sdk/docs/guides/tutorials/generate-image Clone the sample project from GitHub to start building your application. Navigate to the cloned directory to begin. ```bash git clone https://github.com/AdobeDocs/embed-sdk-samples.git cd embed-sdk-samples/code-samples/tutorials/embed-sdk-generate-image ``` -------------------------------- ### Start Workflow from Content with ModuleWorkflow Source: https://developer.adobe.com/express/embed-sdk/docs/v4/sdk/src/workflows/3p/module-workflow-types/interfaces/module-workflow Initiate a workflow using the startFromContent method, allowing users to begin with existing content. Optional application, export, and container configurations are supported. ```typescript startFromContent( appConfig?, exportConfig?, containerConfig?): void; ``` -------------------------------- ### Start Edit Image Export Configuration Source: https://developer.adobe.com/express/embed-sdk/docs/guides/tutorials/workflow-tethering Configuration for starting the Edit Image workflow. This snippet is a placeholder and would typically define actions relevant to image editing. ```javascript export const startEditImageExportConfig = [ { id: "download", label: "Download", action: { target: "download" }, style: { uiType: "button" }, }, { id: "save-generated-image", label: "Save generated image", action: { target: "publish" }, style: { uiType: "button" }, }, { id: "open-edit-image", label: "Edit image", action: { target: "image-module" }, style: { uiType: "button" }, }, ]; ``` -------------------------------- ### Start ngrok tunnel Source: https://developer.adobe.com/express/embed-sdk/docs/guides/tutorials/mobile-web Executes the ngrok tunnel command from the project root to generate a public URL. ```bash npm run ngrok ``` -------------------------------- ### Configure Mobile Container Sizing and Features Source: https://developer.adobe.com/express/embed-sdk/docs/guides/concepts/mobile-web-support-browser Ensure the SDK interface fits properly on smaller mobile screens by configuring container sizing. This example demonstrates setting default mobile dimensions and conditionally applying mobile-specific settings like allowed file types. ```javascript // Mobile container constants const DEFAULT_MOBILE_SIZE = { width: 390, height: 850, unit: 'px' }; const MIN_DESKTOP_WIDTH = 768; const getMobileConfig = () => { const isMobile = window.innerWidth < MIN_DESKTOP_WIDTH; return { skipBrowserSupportCheck: true, // Mobile-specific optimizations ...(isMobile && { // Use mobile container sizing containerSize: DEFAULT_MOBILE_SIZE, // Limit features for mobile allowedFileTypes: ['image/png', 'image/jpeg'], // Skip video/PDF on mobile }) }; }; // Platform category detection for applications const ccEverywhereConfig = { hostInfo: { ...hostInfo, platformCategory: 'web' // applications always use 'web' platform }, configParams: getMobileConfig() }; const { editor, module, quickAction } = await window.CCEverywhere.initialize( ccEverywhereConfig.hostInfo, ccEverywhereConfig.configParams ); ``` -------------------------------- ### Start Editor with Asset Source: https://developer.adobe.com/express/embed-sdk/docs/v4/sdk/src/workflows/3p/editor-workflow/classes/editor-workflow Initiates the editor workflow by loading a specified image asset. Optional parameters can configure the application, export, and container. ```typescript createWithAsset( docConfig, appConfig?, exportConfig?, containerConfig?): void; ``` -------------------------------- ### Set Basic WebViewClient Source: https://developer.adobe.com/express/embed-sdk/docs/guides/concepts/mobile-web-support-webview Assigns a basic WebViewClient to the WebView. This is a minimal setup for handling WebView events. ```kotlin // Set a basic WebViewClient webView?.webViewClient = WebViewClient() ``` -------------------------------- ### Export Configuration Example Source: https://developer.adobe.com/express/embed-sdk/docs/guides/tutorials/workflow-tethering Defines export configurations, including the option to disable cache updates. ```javascript export const exportConfigurations = { // ... other configurations updateCache: false }; ``` -------------------------------- ### Handle WebView URL Loading Source: https://developer.adobe.com/express/embed-sdk/docs/guides/tutorials/mobile-web Triggers the WebView to load the configured URL when the start button is clicked. ```kotlin // MainActivity.kt private fun setUpStartGameHandlers() { findViewById