Update to version 4.5

The previous versions updated to version 4.5 must take into account the following changes.

Changes in Events

The following methods are deprecated in version 4.4 and removed in 4.5:

+(void) trackEvent:(NSString*)token 
+(void) trackEvent:(NSString *)token withAttributes: (NSDictionary*) attributtes
+(void) trackEventWithRequest:(EMMAEventRequest *) request

Both are replaced by the following method:

+(void) trackEvent:(EMMAEventRequest *) request

Example of use:

EMMAEventRequest *eventRequest = [[EMMAEventRequest alloc] initWithToken:@"<token>"];
//Optional: custom attributes
[eventRequest setAttributes: attributes];
//Optional: request status delegate
[eventRequest setRequestDelegate: requestDelegate];
//Optional: custom id for request delegate
[eventRequest setCustomId: customId];

[EMMA trackEvent:eventRequest];

Changes in InApp

The following methods are deprecated:

+(void) inAppMessage:(InAppType)type andRequest:(EMMAInAppRequest*) request
+(void) inAppMessage:(InAppType)type andRequest:(EMMAInAppRequest*) request withDelegate:(id) delegate

Both are replaced by the following methods:

+(void) inAppMessage:(EMMAInAppRequest*) request
+(void) inAppMessage:(EMMAInAppRequest*) request withDelegate (id) delegate

Example of use:

EMMAInAppRequest * inAppRequest = 
[[EMMAInAppRequest alloc] initWithType:Startview];
//Optional: custom attributes
[inAppRequest setAttributes: attributes];
//Optional: request status delegate
[inAppRequest setRequestDelegate: requestDelegate];
//Optional: cumtom id for request delegate
[inAppRequest setCustomId: customId];

[EMMA inAppMessage:inAppRequest];

Info

If the message is to request a Native Ad it is mandatory to use EMMANativeAdRequest (subclass of EMMAInAppRequest) to add the templateId and its specific delegate.

Changes in Push

In this new version, improvements have been made in the notifications.

The following methods are deprecated:

+(void) startPushSystem: (NSDictionary*) launchOptions
+(void) startSession:(NSString*)appKey withOptions:(NSDictionary*)launchOptions 

Due to improvements in the SDK by simply adding delegates Push as explained in section Push Notifications you need not notify the launchOptions the SDK.

 

¿Tiene más preguntas? Enviar una solicitud

0 Comentarios

Inicie sesión para dejar un comentario.