AdColonyZone Class Reference
| Inherits from | NSObject | 
|---|---|
| Declared in | AdColonyZone.h | 
Overview
AdColonyZone objects aggregate informative data about an AdColony zone such as its unique identifier, its ADCOLONY_ZONE_TYPE, etc.
AdColonyZones also provide a block-based handler for zone-level reward events.
Note that you should never instantiate one of these objects directly. You only need to use them when they are passed to you.
Zone
  identifier
	Represents the given zone’s unique string identifier.
@property (nonatomic, readonly) NSString *identifierDiscussion
AdColony zone IDs can be created at the Control Panel.
Declared In
AdColonyZone.h
  type
	Represents the zone type - interstitial, banner, or native.
@property (nonatomic, readonly) AdColonyZoneType typeDiscussion
You can set the type for your zones at the Control Panel.
See Also
Declared In
AdColonyZone.h
  enabled
	Indicates whether or not the zone is enabled.
@property (nonatomic, readonly) BOOL enabledDiscussion
Sending invalid zone id strings to configureWithAppID:zoneIDs:options:completion: will cause this value to be NO.
Declared In
AdColonyZone.h
Rewards
  rewarded
	Indicates whether or not the zone is configured for rewards.
@property (nonatomic, readonly) BOOL rewardedDiscussion
You can configure rewards in your zones at the Control Panel.
Sending invalid zone id strings to configureWithAppID:zoneIDs:options:completion: will cause this value to be NO.
Declared In
AdColonyZone.h
  viewsPerReward
	Represents the number of completed ad views required to receive a reward for the given zone.
@property (nonatomic, readonly) NSUInteger viewsPerRewardDiscussion
This value will be 0 if the given zone is not configured for rewards.
Declared In
AdColonyZone.h
  viewsUntilReward
	Represents the number of ads that must be watched before a reward is given.
@property (nonatomic, readonly) NSUInteger viewsUntilRewardDiscussion
This value will be 0 if the given zone is not configured for rewards.
Declared In
AdColonyZone.h
  rewardAmount
	Represents the reward amount for each completed rewarded ad view.
@property (nonatomic, readonly) NSUInteger rewardAmountDiscussion
This value will be 0 if the given zone is not configured for rewards.
Declared In
AdColonyZone.h
  rewardName
	Represents the singular form of the reward name based on the reward amount.
@property (nonatomic, readonly) NSString *rewardNameDiscussion
This value will be an empty string if the given zone is not configured for rewards.
Declared In
AdColonyZone.h
Handling Rewards
– setReward:
	Sets a block-based reward handler for your zone.
- (void)setReward:(nullable void ( ^ ) ( BOOL success , NSString *name , int amount ))rewardParameters
| reward | Callback for reward grant | 
|---|
Discussion
Based on the success parameter, client-side reward implementations should consider incrementing the user’s currency balance in this method. Server-side reward implementations, however, should consider the success parameter and then contact the game server to determine the current total balance for the virtual currency. Note that the associated block of code will be dispatched on the main thread.
Declared In
AdColonyZone.h