commit | author | age
|
8fa52d
|
1 |
#import <Foundation/Foundation.h> |
L |
2 |
|
|
3 |
#import "FIRAnalytics.h" |
|
4 |
|
|
5 |
NS_ASSUME_NONNULL_BEGIN |
|
6 |
|
|
7 |
/// The type of consent to set. Supported consent types are `ConsentType.adStorage`, |
|
8 |
/// `ConsentType.analyticsStorage`, `ConsentType.adUserData`, and `ConsentType.adPersonalization`. |
|
9 |
/// Omitting a type retains its previous status. |
|
10 |
typedef NSString *FIRConsentType NS_TYPED_ENUM NS_SWIFT_NAME(ConsentType); |
|
11 |
|
|
12 |
/// Enables storage (such as device identifiers) related to advertising. |
|
13 |
extern FIRConsentType const FIRConsentTypeAdStorage; |
|
14 |
|
|
15 |
/// Enables storage (such as app identifiers) related to analytics, e.g. visit duration. |
|
16 |
extern FIRConsentType const FIRConsentTypeAnalyticsStorage; |
|
17 |
|
|
18 |
/// Sets consent for sending user data to Google for advertising purposes. |
|
19 |
extern FIRConsentType const FIRConsentTypeAdUserData; |
|
20 |
|
|
21 |
/// Sets consent for personalized advertising. |
|
22 |
extern FIRConsentType const FIRConsentTypeAdPersonalization; |
|
23 |
|
|
24 |
/// The status value of the consent type. Supported statuses are `ConsentStatus.granted` and |
|
25 |
/// `ConsentStatus.denied`. |
|
26 |
typedef NSString *FIRConsentStatus NS_TYPED_ENUM NS_SWIFT_NAME(ConsentStatus); |
|
27 |
|
|
28 |
/// Consent status indicating consent is denied. For an overview of which data is sent when consent |
|
29 |
/// is denied, see [SDK behavior with consent |
|
30 |
/// mode](https://developers.google.com/tag-platform/security/concepts/consent-mode#tag-behavior). |
|
31 |
extern FIRConsentStatus const FIRConsentStatusDenied; |
|
32 |
|
|
33 |
/// Consent status indicating consent is granted. |
|
34 |
extern FIRConsentStatus const FIRConsentStatusGranted; |
|
35 |
|
|
36 |
/// Sets the applicable end user consent state. |
|
37 |
@interface FIRAnalytics (Consent) |
|
38 |
|
|
39 |
/// Sets the applicable end user consent state (e.g. for device identifiers) for this app on this |
|
40 |
/// device. Use the consent settings to specify individual consent type values. Settings are |
|
41 |
/// persisted across app sessions. By default consent types are set to `ConsentStatus.granted`. |
|
42 |
/// |
|
43 |
/// @param consentSettings A Dictionary of consent types. Supported consent type keys are |
|
44 |
/// `ConsentType.adStorage`, `ConsentType.analyticsStorage`, `ConsentType.adUserData`, and |
|
45 |
/// `ConsentType.adPersonalization`. Valid values are `ConsentStatus.granted` and |
|
46 |
/// `ConsentStatus.denied`. |
|
47 |
+ (void)setConsent:(NSDictionary<FIRConsentType, FIRConsentStatus> *)consentSettings; |
|
48 |
|
|
49 |
@end |
|
50 |
|
|
51 |
NS_ASSUME_NONNULL_END |