# 3DS Native SDKs (iOS)

The WHITELABEL iOS SDK supports running 3D Secure (3DS) challenges natively inside your app using **Netcetera's 3DS SDK**. Native 3DS gives a smoother UX than web-based challenges and may be required by some acquirers for frictionless authentication.

<Note>
  Native 3DS via Netcetera applies to both **payment** and **enrollment** flows.
</Note>

<Note>
  Native 3DS is **opt-in**: you only need to install the module if your integration runs 3DS challenges in-app. If you are not enabling 3DS, you can skip this guide.
</Note>

<Note>
  This is a separate module, so you only add it if you need native 3DS. If your app already customizes the WHITELABEL SDK's styles, those styles propagate automatically to the challenge screen, no additional UI configuration is needed.
</Note>

This guide covers what is specific to Netcetera. Installation and activation follow the same rules as every other module, see [External Native Modules (iOS)](/docs/sdks/external-native-modules/ios-overview).

<Warning>
  The previous standalone package, `yuno-3DS-netcetera-iOS`, is deprecated. Install the module from the `yuno-sdk-ios` package or the `Yuno3DSNetcetera` pod as described below.
</Warning>

## Requirements

- iOS **14.0** or higher.
- **YunoSDK 2.25.0 or higher** already installed in your app.
- The `Yuno3DSNetcetera` module, version **3.0.0 or higher**, installed via Swift Package Manager or CocoaPods (see below).

## Installation

<Tabs>
  <Tab title="Swift Package Manager">
    The module ships in the same package as the WHITELABEL SDK. In Xcode go to **File > Add Package Dependencies...**, add:

    ```
    https://github.com/yuno-payments/yuno-sdk-ios
    ```

    choose **Up to Next Major Version** from `2.25.0`, and tick the `Yuno3DSNetcetera` product next to `YunoSDK`. The Netcetera `ThreeDS_SDK` binary is resolved automatically from Netcetera's repository.
  </Tab>

  <Tab title="CocoaPods">
    Add to your `Podfile`:

    ```ruby
    platform :ios, '14.0'

    target 'YourApp' do
      use_frameworks!

      pod 'YunoSDK',          '~> 2.25'
      pod 'Yuno3DSNetcetera', '~> 3.0'
    end
    ```

    Then run:

    ```bash
    pod install
    ```
  </Tab>
</Tabs>

## Activating the 3DS provider

<Tabs>
  <Tab title="Swift Package Manager">
    The provider **auto-registers** when the framework loads. No extra code is required:

    ```swift
    import YunoSDK

    Yuno.initialize(apiKey: "YOUR_API_KEY", config: YunoConfig())
    ```
  </Tab>

  <Tab title="CocoaPods">
    The CocoaPods build ships as a **static** framework, so it does not auto-register. Call `Yuno3DSNetcetera.register()` **once**, before `Yuno.initialize(...)`:

    ```swift
    import YunoSDK
    import Yuno3DSNetcetera

    Yuno3DSNetcetera.register()
    Yuno.initialize(apiKey: "YOUR_API_KEY", config: YunoConfig())
    ```
  </Tab>
</Tabs>

<Tip>
  Once registered, YunoSDK automatically routes any 3DS challenge through the Netcetera provider. **You don't need to change any of your payment or enrollment code.**
</Tip>

## Sandbox certificate

When testing against the WHITELABEL sandbox environment, the Netcetera SDK requires a Visa test root certificate (`acq-root-certeq-prev-environment.crt`) to be present in your app's main bundle.

<Info>
  **Contact your WHITELABEL TAM (Technical Account Manager) to obtain the certificate.** It is not distributed publicly.
</Info>

Once you have the file:

<Steps>
  <Step title="Add to Xcode">
    Drag it into Xcode's Project Navigator inside your app target's group.
  </Step>
  <Step title="Select target">
    Check **Add to targets** and tick your app target.
  </Step>
  <Step title="Verify bundle resources">
    Verify it appears under **Target → Build Phases → Copy Bundle Resources**.
  </Step>
</Steps>

<Note>
  In production environments this certificate is not used and can be omitted from Release builds.
</Note>

## Troubleshooting

<AccordionGroup>
  <Accordion title="Linker error mentioning YunoThreeDSRegistry">
    Your `YunoSDK` is older than the version this module requires. Bump it to `>= 2.25.0`.
  </Accordion>
  <Accordion title="3DS challenge UI never appears (CocoaPods)">
    You forgot to call `Yuno3DSNetcetera.register()` before `Yuno.initialize(...)`.
  </Accordion>
  <Accordion title="Console: acq-root-certeq-prev-environment.crt not found">
    Only relevant in sandbox. Add the certificate to your app bundle (see [Sandbox certificate](#sandbox-certificate)). Safe to ignore in production.
  </Accordion>
</AccordionGroup>