The secondary methods of devtodev SDK for iOS

Initial referrer tracking

Unfortunately, Apple does not provide any capability to pass a referrer string through to your app from a link to the App Store. But if you have a referral info, you can set it using the method below:

/**
 * Tracks user's referral data
 * ### Usage:
 *    [DevToDev referrer:@{
 *       RFSource: @"adwords",
 *       RFMedium: @"cpi",
 *       RFContent: @"Snow Boots",
 *       RFCampaign: @"Warm Snow Boots",
 *       RFTerm: @"snow boots"
 *    }];
 * 
 * @param NSDictionary<ReferralProperty*, NSString*> utm - Dictionary with referrer values
 */
[DevToDev referrer: (NSDictionary<ReferralProperty*, NSString*> *) utm];

The list of predefined keys:

//To identify a search engine, newsletter name, or other source.
// (for example 'AdWords', 'Bing', 'E-Mail Newsletter')
ReferralProperty * RFSource;

//To identify a medium such as email or cost-per-install.
// (for example 'CPI')
ReferralProperty * RFMedium;

//To identify a specific product promotion or strategic campaign.
//(for example 'Snow Boots')
ReferralProperty * RFCampaign;

//To differentiate ads or links that point to the same URL.
//(for example some ads might advertise 'Warm Snow Boots' and others might advertise 'Durable Snow Boots')
ReferralProperty * RFContent;

//To note the keywords for this ad.
// for example 'shoes+boots')
ReferralProperty * RFTerm;
 
//To add a custom key
[ReferralProperty Custom:@"your_key_name"];

Connecting to social networks

/**
* Tracks the existence of a connection with a social network. 
* Use pre-defined or custom values as an identifier.
* @param SocialNetwork socialNetwork - social network id
*/
[DevToDev socialNetworkConnect: (SocialNetwork *) socialNetwork];javascript:void(0)

Use the current constants to specify a social network:

Facebook
Twitter
GooglePlus
VK
//and so on...

Otherwise, create an object with the social network name you need.

SocialNetwork  socialNetwork = [SocialNetwork Custom: (NSString *) networkName]; (max. 24 symbols)

Posting to social networks

Track publications in social networks and analyze the effectiveness of viral messages. The event is sent after a social network confirms the publication.

/**
* Tracks the existence of posts to a social network.
* @param socialNetwork - social network Id
* @param NSString reason - the reason of posting (max. 32 symbols)
*/
[DevToDev socialNetworkPost: (SocialNetwork *) socialNetwork withReason: (NSString *) reason];

As a «reason» parameter we recommend you to indicate actions which encourage users to make a publication.

For example:

  • Start playing
  • New level reached
  • New building
  • New ability
  • Quest completed
  • New item
  • Collection completed
  • Invitation

 

  • Asking for help
  • New Record
  • Achievement
  • URL sharing
  • Recommendation
  • Review

and so on...

Use the current constants to specify a social network:

Facebook
Twitter
GooglePlus
VK
//and so on…

Otherwise, create an object with the social network name you need.

SocialNetwork  socialNetwork = [SocialNetwork Custom: (NSString *) networkName];
// networkName (max. 24 symbols)

 

OpenUdid

/**
* @return OpenUdid
*/
[DevToDev getOpenUdid];

ODIN1

/**
* @return ODIN1
*/
[DevToDev getOdin1];

UUID

​/**
* @return UUID
*/
[DevToDev getUUID];

Debug  mode

To enable the debug mode and make SDK notifications displayed in the console use this method:

/**
* @param BOOL isActive
*/
[DevToDev setActiveLog: (BOOL) isActive];

Forced sending

To send events pack before it is filled or before its formation period you can use immediate dispatch:

[DevToDev sendBufferedEvents];

Current SDK version

To get the version of integrated SDK use the following method:

/**
* @return SDKVersion
*/
[DevToDev sdkVersion];


Tracking state (GDPR)

The method of limiting the processing of user data. The right to be forgotten.

This method is implemented in accordance with the GDPR requirements.
In case a user doesn’t want their data to be sent and processed in the devtodev system, a developer must send a ’false’ value to this method.
When calling the method setTrackingAvailability with a ‘false’ value, SDK sends a command to the server to delete all user’s personal data that has been collected by devtodev from this app and a command to block the collection of any data of this user in future, and then stops sending any messages to the devtodev system.
The user will remain listed as an impersonal unit in previously aggregated metrics.
When sending a ‘true’ value, the permission to block data collection is removed.
/**
* The method of limiting the processing of user data. The right to be forgotten.
* @param BOOL trackingAvailable - use 'false' to erase user's personal data and stop collecting data of this user.
* 'true' if you want to resume data collection.
*/
[DevToDev setTrackingAvailability: (BOOL) trackingAvailable];
User profile
Anticheat methods