IMSdk Class Reference
Inherits from | NSObject |
---|---|
Declared in | IMSdk.h |
Overview
Use this class to set the user specific demographic info.
As part of the General Data Protection Regulation (“GDPR”) publishers who collect data on their apps, are required to have a legal basis for collecting and processing the personal data of users in the European Economic Area (“EEA”).
Please ensure that you obtain appropriate consent from the user before making ad requests to InMobi for Europe and indicate the same by following our recommended SDK implementation.
Please do not pass any demographics information of a user; if you do not have user consent from such user in Europe.
+ initWithAccountID:
Initialize the sdk. This must be called before any other API for the SDK is used.
+ (void)initWithAccountID:(NSString *)accountID
Parameters
accountID |
account id obtained from the InMobi portal. |
---|
Discussion
Initialize the sdk. This must be called before any other API for the SDK is used.
Declared In
IMSdk.h
+ initWithAccountID:consentDictionary:
Initialize the sdk. This must be called before any other API for the SDK is used.
+ (void)initWithAccountID:(NSString *)accountID consentDictionary:(NSDictionary *)consentDictionary
Parameters
accountID |
account id obtained from the InMobi portal. |
---|---|
consentDictionary |
InMobi relies on the publishers to obtain explicit consent from users for continuing business activities in EU as per GDPR . Consent dictionary allows publishers to indicate consent status as obtained from the users for InMobi services to function appropriately. |
Discussion
Initialize the sdk. This must be called before any other API for the SDK is used.
Declared In
IMSdk.h
+ updateGDPRConsent:
updates the user consent for a session of the app
+ (void)updateGDPRConsent:(NSDictionary *)consentDictionary
Parameters
consentDictionary |
consent dicionary allows publishers to provide its consent to collect user data and use it. |
---|
Discussion
updates the user consent for a session of the app
Declared In
IMSdk.h
+ getVersion
Use this to get the version of the SDK.
+ (NSString *)getVersion
Return Value
The version of the SDK.
Discussion
Use this to get the version of the SDK.
Declared In
IMSdk.h
+ setLogLevel:
Set the log level for SDK’s logs
+ (void)setLogLevel:(IMSDKLogLevel)desiredLogLevel
Parameters
desiredLogLevel |
The desired level of logs. |
---|
Discussion
Set the log level for SDK’s logs
Declared In
IMSdk.h
+ setMute:
Use this to set the global state of the SDK to mute.
+ (void)setMute:(BOOL)shouldMute
Parameters
shouldMute |
Boolean depicting the mute state of the SDK |
---|
Discussion
Use this to set the global state of the SDK to mute.
Declared In
IMSdk.h
+ setAge:
Provide the user’s age to the SDK for targetting purposes.
+ (void)setAge:(unsigned short)age
Parameters
age |
The user’s age. |
---|
Discussion
Provide the user’s age to the SDK for targetting purposes.
Declared In
IMSdk.h
+ setAreaCode:
Provide the user’s area code to the SDK for targetting purposes.
+ (void)setAreaCode:(NSString *)areaCode
Parameters
areaCode |
The user’s area code. |
---|
Discussion
Provide the user’s area code to the SDK for targetting purposes.
Declared In
IMSdk.h
+ setAgeGroup:
Provide the user’s age group to the SDK for targetting purposes.
+ (void)setAgeGroup:(IMSDKAgeGroup)ageGroup
Parameters
ageGroup |
The user’s age group. |
---|
Discussion
Provide the user’s age group to the SDK for targetting purposes.
Declared In
IMSdk.h
+ setYearOfBirth:
Provide a user’s date of birth to the SDK for targetting purposes.
+ (void)setYearOfBirth:(NSInteger)yearOfBirth
Parameters
yearOfBirth |
The user’s date of birth. |
---|
Discussion
Provide a user’s date of birth to the SDK for targetting purposes.
Declared In
IMSdk.h
+ setEducation:
Provide the user’s education status to the SDK for targetting purposes.
+ (void)setEducation:(IMSDKEducation)education
Parameters
education |
The user’s education status. |
---|
Discussion
Provide the user’s education status to the SDK for targetting purposes.
Declared In
IMSdk.h
+ setGender:
Provide the user’s gender to the SDK for targetting purposes.
+ (void)setGender:(IMSDKGender)gender
Parameters
gender |
The user’s gender. |
---|
Discussion
Provide the user’s gender to the SDK for targetting purposes.
Declared In
IMSdk.h
+ setInterests:
Provide the user’s interests to the SDK for targetting purposes.
+ (void)setInterests:(NSString *)interests
Parameters
interests |
The user’s interests. |
---|
Discussion
Provide the user’s interests to the SDK for targetting purposes.
Declared In
IMSdk.h
+ setLanguage:
Provide the user’s preferred language to the SDK for targetting purposes.
+ (void)setLanguage:(NSString *)language
Parameters
language |
The user’s language. |
---|
Discussion
Provide the user’s preferred language to the SDK for targetting purposes.
Declared In
IMSdk.h
+ setLocationWithCity:state:country:
Provide the user’s location to the SDK for targetting purposes.
+ (void)setLocationWithCity:(NSString *)city state:(NSString *)state country:(NSString *)country
Parameters
city |
The user’s city. |
---|---|
state |
The user’s state. |
country |
The user’s country. |
Discussion
Provide the user’s location to the SDK for targetting purposes.
Declared In
IMSdk.h
+ setLocation:
Provide the user’s location to the SDK for targetting purposes.
+ (void)setLocation:(CLLocation *)location
Parameters
location |
The location of the user |
---|
Discussion
Provide the user’s location to the SDK for targetting purposes.
Declared In
IMSdk.h
+ setPostalCode:
Provide the user’s postal code to the SDK for targetting purposes.
+ (void)setPostalCode:(NSString *)postalcode
Parameters
postalcode |
The user’s postalcode. |
---|
Discussion
Provide the user’s postal code to the SDK for targetting purposes.
Declared In
IMSdk.h