> For the complete documentation index, see [llms.txt](https://docs.blueseasx.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.blueseasx.com/client-bidding/ios/initialize-sdk.md).

# Initialize SDK

### **Step1. Privacy Setup**

If users are subject to privacy regulations such as GDPR, CCPA, or COPPA, developers should fully obtain user consent before initializing the SDK and pass the correct signal to the SDK indicating whether the user authorizes the collection and use of personal information.

The SDK provides the following APIs. Developers should call the corresponding API based on the user’s situation and pass the correct values.

**GDPR**\
This section applies to the EU privacy policy. For details, refer to the [General Data Protection Regulation (GDPR)](https://gdpr.eu/)

If you have integrated a third-party CMP platform, such as Google UMP, the SDK will automatically read the TCF String and determine whether the user has authorized the collection and use of personal information. Please ensure that GDPR settings are completed before initializing the SDK.

If you are not using a third-party CMP platform, the SDK provides a separate API interface. You should determine whether the user is subject to GDPR and fully obtain user consent, passing the correct signal to the SDK regarding whether the user authorizes the collection and use of personal information before initializing the SDK.

If the user is subject to GDPR and has authorized the use of personal information, call the API as follows:

```
[BlueSeaSDK setUserConsent:YES option:BSXAdConsentOption_GDPR];
```

If the user is subject to GDPR and has not authorized the use of personal information, call the API as follows:

```
[BlueSeaSDK setUserConsent:NO option:BSXAdConsentOption_GDPR];
```

If the user is not subject to GDPR, you do not need to call the above API.

**CCPA**

This section applies to U.S. user privacy regulations, specifically the [California Consumer Privacy Act (CCPA)](https://oag.ca.gov/privacy/ccpa).

You should determine whether the user is subject to the CCPA policy and fully obtain user consent. Before initializing the SDK, pass the correct signal to the SDK’s API interface indicating whether the user authorizes the collection and use of personal information.

If the user is subject to the CCPA and has authorized the use of personal information, call the API as follows:

```
[BlueSeaSDK setUserConsent:YES option:BSXAdConsentOption_CCPA];
```

If the user is subject to the CCPA and has not authorized the use of personal information, call the API as follows:

```
[BlueSeaSDK setUserConsent:NO option:BSXAdConsentOption_CCPA];
```

If the user is not subject to the CCPA, you do not need to call the above API.

**COPPA**

This section applies to U.S. children’s privacy regulations, specifically the [The Children’s Online Privacy Protection Act (COPPA)](https://www.ftc.gov/business-guidance/privacy-security/childrens-privacy).

If your app is primarily targeted at children (under 13 years old), the Bluesea Ads SDK should not be used for monetization.

If your app is of a mixed audience type, you should determine whether the user is a child under 13 years old. Before initializing the SDK, pass the correct user information to the SDK’s API interface.

If the user is a child under 13 years old, call the API as follows:

```
[BlueSeaSDK setUserConsent:NO option:BSXAdConsentOption_COPPA];
```

If the user is not a child under 13 years old, call the API as follows:

```
[BlueSeaSDK setUserConsent:YES option:BSXAdConsentOption_COPPA];
```

### **Step2. Initialize SDK**

Before initializing the SDK, please ensure that the above privacy settings have been completed. Initialization only needs to be called once after the app starts.

```
[BlueSeaSDK initWithAppId:@"<BlueSea_APP_ID>" completion:^(BOOL success, int32_t code, NSString * _Nullable message) {
        NSLog(@"BlueSeaSDK init, success=%@, code=%d, message=%@", @(success), code, message);
    }];
```
