Skip to content

Commit

Permalink
updated SDK to 9.1.16
Browse files Browse the repository at this point in the history
- modified info text for adding other networks (and enabling modules since the plugin can do that now)
- added additional frameworks/libraries required by new version
- moved external library licenses to root
  • Loading branch information
KarimP committed Oct 19, 2015
1 parent 2de36f5 commit f34f0f7
Show file tree
Hide file tree
Showing 14 changed files with 117 additions and 47 deletions.
2 changes: 1 addition & 1 deletion README.md
@@ -1,7 +1,7 @@
Heyzap Cordova Plugin
=====================

Version: 9.0.6
Version: 9.1.14

This the Heyzap SDK plugin for Apache Cordova.

Expand Down
7 changes: 6 additions & 1 deletion docs/setup_and_requirements.md
Expand Up @@ -40,7 +40,12 @@ Step 2. Add your 3rd-party SDKs
cordova plugin add https://github.com/Heyzap/heyzap-cordova-extras.git#:heyzap-cordova-facebook_audience_network
```

- **iAd"**: **Note: This network works in iOS only.** No extra integration is required for iAd on iOS.
- **iAd**: **Note: This network works in iOS only.** No extra integration is required for iAd on iOS.

- **Leadbolt**: Install the Heyzap's Leadbolt Cordova wrapper plugin, run:
```
cordova plugin add https://github.com/Heyzap/heyzap-cordova-extras.git#:heyzap-cordova-leadbolt
```

- **MdotM**: No extra integration is required for MdotM

Expand Down
4 changes: 4 additions & 0 deletions www/vendor/es6-promise_LICENSE.txt → licenses.txt
@@ -1,3 +1,6 @@
==============================================================================
Software: ES6-Promise
License:
Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors

Permission is hereby granted, free of charge, to any person obtaining a copy of
Expand All @@ -17,3 +20,4 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
==============================================================================
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "heyzap-cordova",
"version": "1.1.3",
"version": "1.1.4",
"description": "Heyzap SDK for Apache Cordova/Adobe PhoneGap",
"cordova": {
"id": "heyzap-cordova",
Expand Down
10 changes: 5 additions & 5 deletions plugin.xml
Expand Up @@ -99,21 +99,21 @@
<framework src="CoreTelephony.framework"/>
<framework src="EventKit.framework"/>
<framework src="EventKitUI.framework"/>
<framework src="MediaPlayer.framework"/>
<framework src="MobileCoreServices.framework"/>
<framework src="QuartzCore.framework"/>
<framework src="Security.framework"/>
<framework src="Social.framework"/>
<framework src="StoreKit.framework"/>
<framework src="SystemConfiguration.framework"/>
<framework src="iAd.framework"/>

<framework src="libxml2.dylib"/>
<framework src="libsqlite3.dylib" />
<!-- / External Frameworks -->

<info>
You may need to enable modules in your Xcode project settings before building the app.
In the Xcode project explorer click on your app project, Go to the 'Build Settings' tab and change 'Enable Modules (C and Objective-C)' to 'yes'.

To add additional ad networks, simply drag and drop the SDK files/frameworks to the Xcode project.
Third party SDKs can be added by adding their appropriate plugins found in the http://www.github.com/Heyzap/heyzap-cordova-extras.
</info>
</platform>
<!-- / iOS -->
Expand Down Expand Up @@ -195,7 +195,7 @@
<info>
You may need to install "Google Play Services" from the "Android Extras" section using the Android SDK manager (run "android").

To add additional ad networks, simply copy the .jar files to {ROOT}/platforms/android/libs/ folder.
Third party SDKs can be added by adding their appropriate plugins found in the http://www.github.com/Heyzap/heyzap-cordova-extras.
</info>

</platform>
Expand Down
Binary file modified src/android/sdk/heyzap-ads-sdk.jar
Binary file not shown.
Expand Up @@ -39,7 +39,7 @@

@class HZShowOptions;

/** HZIncentivizedAd is responsible for fetching and showing incentivized video ads. */
/** HZIncentivizedAd is responsible for fetching and showing incentivized video ads. All methods on this class must be called from the main queue. */
@interface HZIncentivizedAd : NSObject

+ (void)setDelegate:(id<HZIncentivizedAdDelegate>)delegate;
Expand Down Expand Up @@ -84,28 +84,47 @@
*/
+ (void) fetchForTag: (NSString *) tag withCompletion:(void (^)(BOOL, NSError *))completion;


/**
* Fetches an incentivized video ad for each of the given tags.
*
* @param tags An NSArray of NSString* identifiers for the location of ads which you can use to disable ads from your dashboard.
*/
+ (void) fetchForTags:(NSArray *)tags;


/**
* Fetches an incentivized video ad for each of the given tags with an optional completion handler.
*
* @param tag An NSArray of NSString* identifiers for the location of ads which you can use to disable ads from your dashboard.
* @param completion A block called when an ad for each tag is fetched or fails to fetch. `result` states whether the fetch was sucessful; the error object describes the issue, if there was one.
*/
+ (void) fetchForTags:(NSArray *)tags withCompletion:(void (^)(BOOL result, NSError *error))completion;


/**
* Whether or not a video ad is ready to show
* Whether or not an incentivized video ad is ready to show.
*
* @return If the video is ready to show
* @return If an incentivized video ad is ready to show.
*/
+ (BOOL) isAvailable;

/**
* Whether or not an incentivized ad is ready to show for the particular tag.
* Whether or not an incentivized video ad is ready to show for the given tag.
*
* @param tag Tag name describing the location or context for the ad to be shown.
*
* @return If the video is ready to show
* @return If an incentivized video ad is ready to show.
*/
+ (BOOL) isAvailableForTag: (NSString *) tag;

/**
* (Optional) As a layer of added security, you can specify an identifier for the user. You can opt to receive a server-to-server callback with the provided userIdentifier.
*
* @param userIdentifier Any unique identifier, like a username, email, or ID that your server-side database uses.
* @deprecated This method has been deprecated and may be removed in a future version of the SDK.
*/
+ (void) setUserIdentifier: (NSString *) userIdentifier;
+ (void) setUserIdentifier: (NSString *) userIdentifier __attribute__((deprecated("Please use the `incentivizedInfo` string that can be passed to calls to `showWithOptions()` instead if you want to pass information to your server regarding rewarded videos. More info about this feature can be found at https://developers.heyzap.com/docs/advanced-publishing ")));

+ (void) setCreativeID: (int) creativeID;
@end
Expand Up @@ -39,7 +39,7 @@

@protocol HZAdsDelegate;

/** HZInterstitialAd is responsible for fetching and showing interstitial ads. */
/** HZInterstitialAd is responsible for fetching and showing interstitial ads. All methods on this class must be called from the main queue. */
@interface HZInterstitialAd : NSObject

#pragma mark - Showing Ads
Expand All @@ -52,7 +52,7 @@
*
* @param tag An identifier for the location of the ad which you can use to disable the ad from your dashboard.
*/
+ (void) showForTag: (NSString *) tag;
+ (void) showForTag:(NSString *)tag;

/**
* Shows an interstitial ad for a given tag, if available.
Expand Down Expand Up @@ -85,26 +85,43 @@
*
* @param completion A block called when the ad is fetched or failed to fetch. result contains whether or not the fetch was successful, and if not, error contains the reason why.
*/
+ (void) fetchWithCompletion: (void (^)(BOOL result, NSError *error))completion;
+ (void) fetchWithCompletion:(void (^)(BOOL result, NSError *error))completion;


/**
* Fetches an interstitial ad for the given tag.
*
* @param tag An identifier for the location of the ad which you can use to disable the ad from your dashboard.
*/
+ (void) fetchForTag: (NSString *) tag;
+ (void) fetchForTag:(NSString *) tag;


/**
* Fetches an interstitial ad for the given tag with an optional completion handler
* Fetches an interstitial ad for the given tag with an optional completion handler.
*
* @param tag An identifier for the location of the ad which you can use to disable the ad from your dashboard.
* @param completion A block called when the ad is fetched or failed to fetch. result contains whether or not the fetch was successful, and if not, error contains the reason why.
* @param completion A block called when the ad is fetched or fails to fetch. `result` states whether the fetch was sucessful; the error object describes the issue, if there was one.
*/
+ (void) fetchForTag:(NSString *)tag withCompletion:(void (^)(BOOL result, NSError *error))completion;


/**
* Fetches an interstitial ad for each of the given tags.
*
* @param tags An NSArray of NSString* identifiers for the location of ads which you can use to disable ads from your dashboard.
*/
+ (void) fetchForTags:(NSArray *)tags;


/**
* Fetches an interstitial ad for each of the given tags with an optional completion handler.
*
* @param tag An NSArray of NSString* identifiers for the location of ads which you can use to disable ads from your dashboard.
* @param completion A block called when an ad for each tag is fetched or fails to fetch. `result` states whether the fetch was sucessful; the error object describes the issue, if there was one.
*/
+ (void) fetchForTag:(NSString *)tag withCompletion: (void (^)(BOOL result, NSError *error))completion;
+ (void) fetchForTags:(NSArray *)tags withCompletion:(void (^)(BOOL result, NSError *error))completion;

/** Whether or not an ad is available to show. */
/** Whether or not an interstitial ad is available to show. */
+ (BOOL) isAvailable;


Expand All @@ -113,9 +130,9 @@
*
* @param tag An identifier for the location of the ad which you can use to disable the ad from your dashboard.
*
* @return If the ad was available
* @return If an interstitial ad is available to show.
*/
+ (BOOL) isAvailableForTag: (NSString *) tag;
+ (BOOL) isAvailableForTag:(NSString *)tag;


#pragma mark - Private methods
Expand Down
Expand Up @@ -74,7 +74,7 @@
- (void)reportImpression;

/**
* When the user clicks the ad, call this method to present an SKStoreProductViewController for that ad. This method will handle reporting the click to Heyzap.
* When the user clicks the ad, call this method to present an SKStoreProductViewController for that ad. This method will handle reporting the click to Heyzap. This method must be called on the main queue.
*
* @param viewController The view controller which should present the `SKStoreProductViewController`.
* @param storeDelegate The delegate for the `SKStoreProductViewController`. The delegate should dismiss the `SKStoreProductViewController` when `productViewControllerDidFinish:` is called on it.
Expand Down
Expand Up @@ -10,7 +10,7 @@
@class HZNativeAdCollection;

/**
* Use this class to fetch native ads from Heyzap. See `HZNativeAdCollection` and `HZNativeAd` for details.
* Use this class to fetch native ads from Heyzap. See `HZNativeAdCollection` and `HZNativeAd` for details. All methods on this class must be called from the main queue.
*/
@interface HZNativeAdController : NSObject

Expand Down
Expand Up @@ -36,7 +36,7 @@
#import "HeyzapAds.h"

/** HZShowOptions allows you to pass options to configure how ads are shown */
@interface HZShowOptions : NSObject <NSCopying>
@interface HZShowOptions : NSObject

/**
* @discussion A UIViewController that should present the ad being shown. If not specified the application's key window's root view controller is used.
Expand All @@ -53,4 +53,9 @@
*/
@property (nonatomic, copy) void (^completion)(BOOL result, NSError *error);

/**
* @discussion When an incentivized video is completed, this string will be sent to your server via our server-to-server callbacks. Set it to anything you want to pass to your server regarding this incentivized video view (i.e.: a username, user ID, level name, etc.), or leave it `nil` if you don't need to use it / aren't using server callbacks for incentivized video. This parameter will be ignored for ads shown via classes other than `HZIncentivizedAd`.
*/
@property (nonatomic, strong) NSString *incentivizedInfo;

@end
Expand Up @@ -39,7 +39,7 @@

@protocol HZAdsDelegate;

/** HZVideoAd is responsible for fetching and showing video ads. */
/** HZVideoAd is responsible for fetching and showing video ads. All methods on this class must be called from the main queue. */
@interface HZVideoAd : NSObject

#pragma mark - Showing Ads
Expand Down Expand Up @@ -98,19 +98,37 @@
*/
+ (void) fetchForTag:(NSString *)tag withCompletion: (void (^)(BOOL result, NSError *error))completion;


/**
* Fetches a video ad for each of the given tags.
*
* @param tags An NSArray of NSString* identifiers for the location of ads which you can use to disable ads from your dashboard.
*/
+ (void) fetchForTags:(NSArray *)tags;


/**
* Fetches a video ad for each of the given tags with an optional completion handler.
*
* @param tag An NSArray of NSString* identifiers for the location of ads which you can use to disable ads from your dashboard.
* @param completion A block called when an ad for each tag is fetched or fails to fetch. `result` states whether the fetch was sucessful; the error object describes the issue, if there was one.
*/
+ (void) fetchForTags:(NSArray *)tags withCompletion:(void (^)(BOOL result, NSError *error))completion;


/**
* Whether or not a video ad is ready to show
* Whether or not a video ad is ready to show.
*
* @return If the video is ready to show
* @return If a video is ready to show.
*/
+ (BOOL) isAvailable;

/**
* Whether or not the video is ready to show for the given tag
* Whether or not a video is ready to show for the given tag.
*
* @param tag An identifier for the location of the ad which you can use to disable the ad from your dashboard.
*
* @return Whether or not the video is ready to show for the given tag
* @return Whether or not a video is ready to show for the given tag.
*/
+ (BOOL) isAvailableForTag: (NSString *) tag;

Expand Down
Expand Up @@ -51,7 +51,7 @@
#define NS_ENUM(_type, _name) enum _name : _type _name; enum _name : _type
#endif

#define SDK_VERSION @"9.0.6"
#define SDK_VERSION @"9.1.14"

#if __has_feature(objc_modules)
@import AdSupport;
Expand Down Expand Up @@ -96,8 +96,9 @@ extern NSString * const HZNetworkChartboost;
extern NSString * const HZNetworkAdColony;
extern NSString * const HZNetworkAdMob;
extern NSString * const HZNetworkIAd;
extern NSString * const HZNetworkHyperMX;
extern NSString * const HZNetworkHyprMX;
extern NSString * const HZNetworkHeyzapExchange;
extern NSString * const HZNetworkLeadbolt;

// General Network Callbacks
extern NSString * const HZNetworkCallbackInitialized;
Expand All @@ -111,13 +112,14 @@ extern NSString * const HZNetworkCallbackIncentivizedResultIncomplete;
extern NSString * const HZNetworkCallbackIncentivizedResultComplete;
extern NSString * const HZNetworkCallbackAudioStarting;
extern NSString * const HZNetworkCallbackAudioFinished;
extern NSString * const HZNetworkCallbackBannerLoaded;
extern NSString * const HZNetworkCallbackBannerClick;
extern NSString * const HZNetworkCallbackBannerHide;
extern NSString * const HZNetworkCallbackBannerDismiss;
extern NSString * const HZNetworkCallbackBannerFetchFailed;
extern NSString * const HZNetworkCallbackLeaveApplication;

extern NSString * const HZNetworkCallbackBannerLoaded DEPRECATED_ATTRIBUTE;
extern NSString * const HZNetworkCallbackBannerClick DEPRECATED_ATTRIBUTE;
extern NSString * const HZNetworkCallbackBannerHide DEPRECATED_ATTRIBUTE;
extern NSString * const HZNetworkCallbackBannerDismiss DEPRECATED_ATTRIBUTE;
extern NSString * const HZNetworkCallbackBannerFetchFailed DEPRECATED_ATTRIBUTE;

// Chartboost Specific Callbacks
extern NSString * const HZNetworkCallbackChartboostMoreAppsFetchFailed;
extern NSString * const HZNetworkCallbackChartboostMoreAppsDismiss;
Expand Down Expand Up @@ -216,17 +218,10 @@ extern NSString * const HZRemoteDataRefreshedNotification;
@end

/**
* A class with miscellaneous Heyzap Ads methods.
* A class with miscellaneous Heyzap Ads methods. All methods on this class must be called from the main queue.
*/
@interface HeyzapAds : NSObject

/**
* Sets the object to receive HZIncentivizedAdDelegate callbacks
*
* @param delegate An object conforing to the HZIncentivizedAdDelegate protocol
*/
+ (void) setIncentiveDelegate: (id<HZIncentivizedAdDelegate>) delegate __attribute__((deprecated("Call `HZIncentivizedAd setDelegate:` instead.")));

/**
* Sets an object to be forwarded all callbacks sent by the specified network.
*
Expand Down Expand Up @@ -315,6 +310,13 @@ extern NSString * const HZRemoteDataRefreshedNotification;
*/
+ (void)resumeExpensiveWork;

/**
* Returns a raw json string of developer-settable data or an empty json string if no data is available.
*
*/
+ (NSString *) getRemoteDataJsonString;


#pragma mark - Record IAP Transaction

/**
Expand Down
Binary file modified src/ios/sdk/Heyzap/HeyzapAds.framework/Versions/A/HeyzapAds
Binary file not shown.

0 comments on commit f34f0f7

Please sign in to comment.