> For the complete documentation index, see [llms.txt](https://docs.luciq.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.luciq.ai/ios/setup-luciq-for-ios/custom-settings/privacy-settings/user-privacy.md).

# User Privacy

Configure user privacy settings for the Luciq SDK in your iOS app. Manage data collection, opt-out options, and GDPR compliance for iOS users.

We understand user privacy is of key to you, specially having our SDK on production. In this guide, we will show you how to mark views containing sensitive information as private. By doing so, these views will be masked on screenshots captured to your users' devices (before being sent to Luciq servers) and automatically appear with a black overlay (over whole screen, labels, texts or media) in any screenshot on Luciq's dashboard to protect your user’s sensitive data.

{% hint style="info" %}
Repro steps screenshots are disabled by default on crash reporting.
{% endhint %}

1. Identify the View: Determine which view in your app contains sensitive information that should be kept private. For example, a payment details screen or a user's personal profile.
2. Identify Sensitive Information: Determine which information on each view that you need to hide. Do you want to hide the whole screen? text fields? media? labels?
3. Deciding on the content of the screenshots\
   Luciq provides you with multiple ways to easily protect your users sensitive data, whether you want to hide the content of a whole specific screen or certain text fields, labels and media, we got you covered!

**Auto masking**\
You can automatically mask sensitive data when screenshots are captured, while protecting the user's privacy by default using auto masking feature. Keep in mind that this feature affects both Bug and Crash Reporting.

<figure><img src="https://828794017-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAM8wNfllcup3GnWJ1WtW%2Fuploads%2Fgit-blob-cf5f9ca98e2b41f56bde7389800ef35352957e5f%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

*Masking text inputs*\
You can use this to hide any text fields captured on all your screenshots

{% tabs %}
{% tab title="Swift" %}
{% code overflow="wrap" %}

```swift
Luciq.setAutoMaskScreenshots([.textInputs])
```

{% endcode %}
{% endtab %}

{% tab title="Objective-C" %}
{% code overflow="wrap" %}

```objectivec
[Luciq setAutoMaskScreenshots: LCQAutoMaskScreenshotOptionTextInputs];
```

{% endcode %}
{% endtab %}
{% endtabs %}

*Masking labels*\
This can be utilized to hide text labels including buttons and titles

{% tabs %}
{% tab title="Swift" %}
{% code overflow="wrap" %}

```swift
Luciq.setAutoMaskScreenshots([.labels])
```

{% endcode %}
{% endtab %}

{% tab title="Objective-C" %}
{% code overflow="wrap" %}

```objectivec
[Luciq setAutoMaskScreenshots: LCQAutoMaskScreenshotOptionLabels];
```

{% endcode %}
{% endtab %}
{% endtabs %}

*Masking images and videos*\
If your users might be sharing private images or videos on the app, in which you wouldn't want access to, you can utilize the following property to hide it.

{% tabs %}
{% tab title="Swift" %}
{% code overflow="wrap" %}

```swift
Luciq.setAutoMaskScreenshots([.media])
```

{% endcode %}
{% endtab %}

{% tab title="Objective-C" %}
{% code overflow="wrap" %}

```objectivec
[Luciq setAutoMaskScreenshots: LCQAutoMaskScreenshotOptionMedia];
```

{% endcode %}
{% endtab %}
{% endtabs %}

*Masking nothing*\
You can also disable auto-masking all together if you need using the following property

{% tabs %}
{% tab title="Swift" %}
{% code overflow="wrap" %}

```swift
Luciq.setAutoMaskScreenshots([.maskNothing])
```

{% endcode %}
{% endtab %}

{% tab title="Objective-C" %}
{% code overflow="wrap" %}

```objectivec
[Luciq setAutoMaskScreenshots: LCQAutoMaskScreenshotOptionMaskNothing];
```

{% endcode %}
{% endtab %}
{% endtabs %}

*Mix and match*\
You can combine different masking options according to your needs. For example, if you want to mask both text Inputs and labels, you can use the following API

{% tabs %}
{% tab title="Swift" %}
{% code overflow="wrap" %}

```swift
Luciq.setAutoMaskScreenshots([.textInputs, .labels])
```

{% endcode %}
{% endtab %}
{% endtabs %}

**Hide a whole screen**\
In case you need to add an extra layer of privacy and prevent sensitive information from being captured in screenshots. This property will hide the overall screen when the view appears in a screenshot

{% tabs %}
{% tab title="Swift" %}
{% code overflow="wrap" %}

```swift
view.luciq_privateView = true
```

{% endcode %}
{% endtab %}

{% tab title="Objective-C" %}
{% code overflow="wrap" %}

```objectivec
view.luciq_privateView = YES;
```

{% endcode %}
{% endtab %}
{% endtabs %}

<figure><img src="https://828794017-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAM8wNfllcup3GnWJ1WtW%2Fuploads%2Fgit-blob-6b7d2dae13a28a1ae33ff1a719bdddda28e703b1%2Fimage.png?alt=media" alt=""><figcaption><p><em>Example of private view</em></p></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.luciq.ai/ios/setup-luciq-for-ios/custom-settings/privacy-settings/user-privacy.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
