--- title: "Set GDPR Consent" slug: "ios-set-gdpr-consent" description: "Grant or revoke GDPR data-collection consent in iOS using setGDPRConsent. Required before sharing user data." tags: ["ios gdpr consent"] updated: 2026-11-20T12:45:16Z published: 2026-11-20T12:45:16Z canonical: "academy.insiderone.com/ios-set-gdpr-consent" --- > ## Documentation Index > Fetch the complete documentation index at: https://academy.insiderone.com/llms.txt > Use this file to discover all available pages before exploring further. # Set GDPR Consent > **Suggested reading**: [Insider and General Data Protection Regulation (GDPR)](https://academy.insiderone.com/docs/insider-and-gdpr) This method allows you to get your users' consent to collect data. You can call this method after the SDK initialization on every step where you ask for your users' consent. Insider SDK collects this data by default. You do not need to call this function if you are not asking for users' consent.  | Parameter | Data Type | | --- | --- | | gdprConsent | Boolean | If you set it to *false*, the user will not share any data or receive any push notifications until you set it back to *true*. ## Method signature ```objectivec +(void)setGDPRConsent:(BOOL)gdprConsent; ``` ## Method examples The following code snippets show how to use this method in Objective-C and Swift. ```objectivec [Insider setGDPRConsent:true]; ``` ```swift Insider.setGDPRConsent(true) ``` You must set the GDPR after the SDK initializes. You can place any GDPR handling after Insider SDK initializes. ## Related - [Insider One and General Data Protection Regulation (GDPR)](/insider-one-and-gdpr.md)