> For the complete documentation index, see [llms.txt](https://docs.facephi.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.facephi.com/docs.facephi-en/sdks/sdk-mobile/ios-sdk/inicializacion/lanzamiento-simplificado.md).

# Simplified Launch

## Initialize the SDK

The SDK works through a **main controller (`SDKController`)**. Facephi will provide the `apiKey` license required for initialization.

```swift
 import core
 import sdk
 import trackingComponent
 
 ...
 
 let trackingController = TrackingController(
     trackingError: { trackingError in
         self.log("TRACKING ERROR: \(trackingError)")
     },
     enableLocation: false)

SDKController.shared.initSdk(licensingUrl: SdkConfigurationManager.LICENSING_URL, apiKey: SdkConfigurationManager.APIKEY_LICENSING, output: { sdkResult in
    if sdkResult.finishStatus == .STATUS_OK {
        self.log("Automatic License set correctly")
    } else {
        self.log("An error occurred while trying to obtain the License: \(sdkResult.errorType)")
    }
}, trackingController: trackingController)

```

## Start operation

Before launching any component, it is mandatory **start an operation**.

This method has 3 input parameters:

* **operationType**: Indicates whether an ONBOARDING or AUTHENTICATION process will be performed.
* **customerId**: User identifier (controlled at application level).
* **steps**: List of operation steps if they have been previously defined:

**- Defined steps**:

{% code overflow="wrap" %}

```swift
SDKController.shared.newOperation(operationType: OperationType.X, customerId: "customerId", steps: [.SELPHI, .SELPHID, .OTHER("CUSTOM_STEP")], output: { _ in })
```

{% endcode %}

**- Steps not defined:**

{% code overflow="wrap" %}

```swift
SDKController.shared.newOperation(operationType: OperationType.X, customerId: "customerId", output: { _ in})
```

{% endcode %}

## Component launch

Each component has its own controller and is launched from `SDKController`.

{% code overflow="wrap" %}

```swift
public func launchExample(setTracking: Bool = true,viewController: UIViewController,componentConfigurationData: ComponentConfigurationData)
{
    let output: (SdkResult<ExampleResult>) -> Void = { exampleResult in
        print("exampleResult: \(exampleResult.finishStatus)")
    }
        
    let controller = ExampleController(data: exampleConfigurationData, output: output, viewController: viewController)
        
    if setTracking {
        SDKController.shared.launch(controller: controller)
    } else {
        SDKController.shared.launchMethod(controller: controller)
    }
}
```

{% endcode %}
