IMNative Class Reference

Inherits from NSObject
Declared in IMNative.h

Overview

Class to integrate native ads in your application Use this class to integrate native ads in your application. For native ads, your application is given the raw assets for the ad. Your application can render these in a manner that is native to the look and feel of your application to drive better user engagement with the ad. If you need to customize aspects of ad impression and click-through reporting, your application can use the IMCustomNative class.

– primaryViewOfWidth:

The primary view of the native ad. This view is rendered by InMobi and should be used by the publisher to display the ad. Impressions will be computed on this view.

- (UIView *)primaryViewOfWidth:(CGFloat)width

Parameters

width

The width of the primary view. Typically this should be the screen width.

Discussion

The primary view of the native ad. This view is rendered by InMobi and should be used by the publisher to display the ad. Impressions will be computed on this view.

Declared In

IMNative.h

  customAdContent

The content of the native ad.

@property (nonatomic, strong, readonly) NSString *customAdContent

Discussion

The content of the native ad.

Declared In

IMNative.h

  adTitle

The title of the native ad.

@property (nonatomic, strong, readonly) NSString *adTitle

Discussion

The title of the native ad.

Declared In

IMNative.h

  adDescription

The description of the native ad.

@property (nonatomic, strong, readonly) NSString *adDescription

Discussion

The description of the native ad.

Declared In

IMNative.h

  adIcon

The icon url of the ad.

@property (nonatomic, strong, readonly) UIImage *adIcon

Discussion

The icon url of the ad.

Declared In

IMNative.h

  adCtaText

The text to be specified for the cta. Typically this should be the text of the button.

@property (nonatomic, strong, readonly) NSString *adCtaText

Discussion

The text to be specified for the cta. Typically this should be the text of the button.

Declared In

IMNative.h

  adRating

A custom rating field for the native ad.

@property (nonatomic, strong, readonly) NSString *adRating

Discussion

A custom rating field for the native ad.

Declared In

IMNative.h

  adLandingPageUrl

The landing page url of the Native ad.

@property (nonatomic, strong, readonly) NSURL *adLandingPageUrl

Discussion

The landing page url of the Native ad.

Declared In

IMNative.h

  isAppDownload

Indicates if the ad is an app download ad.

@property (nonatomic, readonly) BOOL isAppDownload

Discussion

Indicates if the ad is an app download ad.

Declared In

IMNative.h

  delegate

The delegate to receive callbacks

@property (nonatomic, weak) id<IMNativeDelegate> delegate

Discussion

The delegate to receive callbacks

Declared In

IMNative.h

  keywords

A free form set of keywords, separated by ‘,’ to be sent with the ad request. E.g: “sports,cars,bikes”

@property (nonatomic, strong) NSString *keywords

Discussion

A free form set of keywords, separated by ‘,’ to be sent with the ad request. E.g: “sports,cars,bikes”

Declared In

IMNative.h

  extras

Any additional information to be passed to InMobi.

@property (nonatomic, strong) NSDictionary *extras

Discussion

Any additional information to be passed to InMobi.

Declared In

IMNative.h

  creativeId

A unique identifier for the creative.

@property (nonatomic, strong, readonly) NSString *creativeId

Discussion

A unique identifier for the creative.

Declared In

IMNative.h

– initWithPlacementId:

Initialize a Native ad with the given PlacementId

- (instancetype)initWithPlacementId:(long long)placementId

Parameters

placementId

The placementId for loading the native ad

Discussion

Initialize a Native ad with the given PlacementId

Declared In

IMNative.h

– initWithPlacementId:delegate:

Initialize a Native ad with the given PlacementId

- (instancetype)initWithPlacementId:(long long)placementId delegate:(id<IMNativeDelegate>)delegate

Parameters

placementId

The placementId for loading the native ad

delegate

The delegate to receive callbacks from IMNative

Discussion

Initialize a Native ad with the given PlacementId

Declared In

IMNative.h

– getSignals

Get signals from the SDK. The signals will be asynchronously given via the gotSignals method on the IMNativeDelegate protocol.

- (void)getSignals

Discussion

Get signals from the SDK. The signals will be asynchronously given via the gotSignals method on the IMNativeDelegate protocol.

Declared In

IMNative.h

– load

Loads a Native ad

- (void)load

Discussion

Loads a Native ad

Declared In

IMNative.h

– load:

Loads a Native Ad with a specified response.

- (void)load:(NSData *)response

Discussion

Loads a Native Ad with a specified response.

Declared In

IMNative.h

– isReady

Indicates if the native ad is ready to be displayed.

- (BOOL)isReady

Discussion

Indicates if the native ad is ready to be displayed.

Declared In

IMNative.h

– reportAdClickAndOpenLandingPage

Reports the click action to the native ad and open the landing page.

- (void)reportAdClickAndOpenLandingPage

Discussion

Reports the click action to the native ad and open the landing page.

Declared In

IMNative.h

– recyclePrimaryView

Recycle the view that was presented by the native ad

- (void)recyclePrimaryView

Discussion

Recycle the view that was presented by the native ad

Declared In

IMNative.h

– getAdMetaInfo

Contains additional information of ad.

- (NSDictionary *)getAdMetaInfo

Discussion

Contains additional information of ad.

Declared In

IMNative.h