diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..a8fde247 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +src/ios/Airship/libUAirship-9.4.0.a filter=lfs diff=lfs merge=lfs -text diff --git a/CHANGELOG b/CHANGELOG index 2a719491..37cf2a57 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,9 @@ +================================= +Version 7.2.1 - September 20, 2018 +================================= +- Updated iOS SDK to 9.4.0 +- Updated Android SDK to 9.5.2 + ================================= Version 7.2.0 - July 26, 2018 ================================= diff --git a/config_sample.xml b/config_sample.xml index 23a52195..ce5ec43b 100644 --- a/config_sample.xml +++ b/config_sample.xml @@ -1,5 +1,5 @@ - + Test A sample Apache Cordova application that responds to the deviceready event. diff --git a/package.json b/package.json index f0710cae..2aec4f36 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "urbanairship-cordova", - "version": "7.2.0", + "version": "7.2.1", "description": "Urban Airship Cordova plugin", "cordova": { "id": "urbanairship-cordova", diff --git a/plugin.xml b/plugin.xml index 175cdc01..f73fbde3 100644 --- a/plugin.xml +++ b/plugin.xml @@ -1,6 +1,6 @@ @@ -321,6 +321,7 @@ + @@ -337,7 +338,7 @@ - + diff --git a/src/android/build-extras.gradle b/src/android/build-extras.gradle index 268979ee..9f0f469c 100644 --- a/src/android/build-extras.gradle +++ b/src/android/build-extras.gradle @@ -19,12 +19,12 @@ allprojects { } dependencies { - implementation 'com.google.firebase:firebase-core:16.0.0' + implementation 'com.google.firebase:firebase-core:16.0.3' implementation 'com.android.support:support-v4:27.1.1' implementation 'com.android.support:support-annotations:27.1.1' implementation 'com.google.android.gms:play-services-location:15.0.1' implementation 'com.android.support:appcompat-v7:27.1.1' - implementation 'com.urbanairship.android:urbanairship-fcm:9.4.1' + implementation 'com.urbanairship.android:urbanairship-fcm:9.5.2' } cdvPluginPostBuildExtras.push({ diff --git a/src/ios/Airship/AirshipResources.bundle/Info.plist b/src/ios/Airship/AirshipResources.bundle/Info.plist index 129a5269..52d53f6b 100644 Binary files a/src/ios/Airship/AirshipResources.bundle/Info.plist and b/src/ios/Airship/AirshipResources.bundle/Info.plist differ diff --git a/src/ios/Airship/AirshipResources.bundle/UAInAppMessageBannerContentView.nib/objects-11.0+.nib b/src/ios/Airship/AirshipResources.bundle/UAInAppMessageBannerContentView.nib/objects-11.0+.nib index 54ab275e..1845b4fb 100644 Binary files a/src/ios/Airship/AirshipResources.bundle/UAInAppMessageBannerContentView.nib/objects-11.0+.nib and b/src/ios/Airship/AirshipResources.bundle/UAInAppMessageBannerContentView.nib/objects-11.0+.nib differ diff --git a/src/ios/Airship/AirshipResources.bundle/UAInAppMessageBannerContentView.nib/runtime.nib b/src/ios/Airship/AirshipResources.bundle/UAInAppMessageBannerContentView.nib/runtime.nib index d4dc108f..a17662a8 100644 Binary files a/src/ios/Airship/AirshipResources.bundle/UAInAppMessageBannerContentView.nib/runtime.nib and b/src/ios/Airship/AirshipResources.bundle/UAInAppMessageBannerContentView.nib/runtime.nib differ diff --git a/src/ios/Airship/AirshipResources.bundle/UAInAppMessageBannerView.nib/objects-11.0+.nib b/src/ios/Airship/AirshipResources.bundle/UAInAppMessageBannerView.nib/objects-11.0+.nib index 0179dd49..722616be 100644 Binary files a/src/ios/Airship/AirshipResources.bundle/UAInAppMessageBannerView.nib/objects-11.0+.nib and b/src/ios/Airship/AirshipResources.bundle/UAInAppMessageBannerView.nib/objects-11.0+.nib differ diff --git a/src/ios/Airship/AirshipResources.bundle/UAInAppMessageBannerView.nib/runtime.nib b/src/ios/Airship/AirshipResources.bundle/UAInAppMessageBannerView.nib/runtime.nib index eb59366c..8fa7ead2 100644 Binary files a/src/ios/Airship/AirshipResources.bundle/UAInAppMessageBannerView.nib/runtime.nib and b/src/ios/Airship/AirshipResources.bundle/UAInAppMessageBannerView.nib/runtime.nib differ diff --git a/src/ios/Airship/AirshipResources.bundle/UAInAppMessageButtonView.nib b/src/ios/Airship/AirshipResources.bundle/UAInAppMessageButtonView.nib index 1be0dd78..66ceb87b 100644 Binary files a/src/ios/Airship/AirshipResources.bundle/UAInAppMessageButtonView.nib and b/src/ios/Airship/AirshipResources.bundle/UAInAppMessageButtonView.nib differ diff --git a/src/ios/Airship/AirshipResources.bundle/UAInAppMessageFullScreenView.nib/objects-11.0+.nib b/src/ios/Airship/AirshipResources.bundle/UAInAppMessageFullScreenView.nib/objects-11.0+.nib index be0f68ab..bcffd6e3 100644 Binary files a/src/ios/Airship/AirshipResources.bundle/UAInAppMessageFullScreenView.nib/objects-11.0+.nib and b/src/ios/Airship/AirshipResources.bundle/UAInAppMessageFullScreenView.nib/objects-11.0+.nib differ diff --git a/src/ios/Airship/AirshipResources.bundle/UAInAppMessageFullScreenView.nib/runtime.nib b/src/ios/Airship/AirshipResources.bundle/UAInAppMessageFullScreenView.nib/runtime.nib index 4b22da3e..1cf9bd38 100644 Binary files a/src/ios/Airship/AirshipResources.bundle/UAInAppMessageFullScreenView.nib/runtime.nib and b/src/ios/Airship/AirshipResources.bundle/UAInAppMessageFullScreenView.nib/runtime.nib differ diff --git a/src/ios/Airship/AirshipResources.bundle/UAInAppMessageHTMLView.nib/objects-11.0+.nib b/src/ios/Airship/AirshipResources.bundle/UAInAppMessageHTMLView.nib/objects-11.0+.nib deleted file mode 100644 index 6222dc50..00000000 Binary files a/src/ios/Airship/AirshipResources.bundle/UAInAppMessageHTMLView.nib/objects-11.0+.nib and /dev/null differ diff --git a/src/ios/Airship/AirshipResources.bundle/UAInAppMessageHTMLView.nib/runtime.nib b/src/ios/Airship/AirshipResources.bundle/UAInAppMessageHTMLView.nib/runtime.nib deleted file mode 100644 index ac85e46a..00000000 Binary files a/src/ios/Airship/AirshipResources.bundle/UAInAppMessageHTMLView.nib/runtime.nib and /dev/null differ diff --git a/src/ios/Airship/AirshipResources.bundle/UAInAppMessageHTMLViewController.nib b/src/ios/Airship/AirshipResources.bundle/UAInAppMessageHTMLViewController.nib new file mode 100644 index 00000000..d1757317 Binary files /dev/null and b/src/ios/Airship/AirshipResources.bundle/UAInAppMessageHTMLViewController.nib differ diff --git a/src/ios/Airship/AirshipResources.bundle/UAInAppMessageModalViewController.nib b/src/ios/Airship/AirshipResources.bundle/UAInAppMessageModalViewController.nib new file mode 100644 index 00000000..f7c9ba4d Binary files /dev/null and b/src/ios/Airship/AirshipResources.bundle/UAInAppMessageModalViewController.nib differ diff --git a/src/ios/Airship/AirshipResources.bundle/UAInAppMessageModalViewController.nib/objects-11.0+.nib b/src/ios/Airship/AirshipResources.bundle/UAInAppMessageModalViewController.nib/objects-11.0+.nib deleted file mode 100644 index 2842b586..00000000 Binary files a/src/ios/Airship/AirshipResources.bundle/UAInAppMessageModalViewController.nib/objects-11.0+.nib and /dev/null differ diff --git a/src/ios/Airship/AirshipResources.bundle/UAInAppMessageModalViewController.nib/runtime.nib b/src/ios/Airship/AirshipResources.bundle/UAInAppMessageModalViewController.nib/runtime.nib deleted file mode 100644 index 134db263..00000000 Binary files a/src/ios/Airship/AirshipResources.bundle/UAInAppMessageModalViewController.nib/runtime.nib and /dev/null differ diff --git a/src/ios/Airship/AirshipResources.bundle/UAInAppMessageResizableViewController.nib/objects-11.0+.nib b/src/ios/Airship/AirshipResources.bundle/UAInAppMessageResizableViewController.nib/objects-11.0+.nib new file mode 100644 index 00000000..09e3d4fe Binary files /dev/null and b/src/ios/Airship/AirshipResources.bundle/UAInAppMessageResizableViewController.nib/objects-11.0+.nib differ diff --git a/src/ios/Airship/AirshipResources.bundle/UAInAppMessageResizableViewController.nib/runtime.nib b/src/ios/Airship/AirshipResources.bundle/UAInAppMessageResizableViewController.nib/runtime.nib new file mode 100644 index 00000000..6b09bf3e Binary files /dev/null and b/src/ios/Airship/AirshipResources.bundle/UAInAppMessageResizableViewController.nib/runtime.nib differ diff --git a/src/ios/Airship/AirshipResources.bundle/UAMessageCenterListCell.nib b/src/ios/Airship/AirshipResources.bundle/UAMessageCenterListCell.nib index cd589a27..89cfb178 100644 Binary files a/src/ios/Airship/AirshipResources.bundle/UAMessageCenterListCell.nib and b/src/ios/Airship/AirshipResources.bundle/UAMessageCenterListCell.nib differ diff --git a/src/ios/Airship/AirshipResources.bundle/UAMessageCenterListViewController.nib b/src/ios/Airship/AirshipResources.bundle/UAMessageCenterListViewController.nib index 72d18195..892d5611 100644 Binary files a/src/ios/Airship/AirshipResources.bundle/UAMessageCenterListViewController.nib and b/src/ios/Airship/AirshipResources.bundle/UAMessageCenterListViewController.nib differ diff --git a/src/ios/Airship/AirshipResources.bundle/UAMessageCenterMessageViewController.nib b/src/ios/Airship/AirshipResources.bundle/UAMessageCenterMessageViewController.nib index 827ade2f..a1eea156 100644 Binary files a/src/ios/Airship/AirshipResources.bundle/UAMessageCenterMessageViewController.nib and b/src/ios/Airship/AirshipResources.bundle/UAMessageCenterMessageViewController.nib differ diff --git a/src/ios/Airship/AirshipResources.bundle/UAOverlayView.nib/objects-11.0+.nib b/src/ios/Airship/AirshipResources.bundle/UAOverlayView.nib/objects-11.0+.nib index 9bf06c1c..2060cab5 100644 Binary files a/src/ios/Airship/AirshipResources.bundle/UAOverlayView.nib/objects-11.0+.nib and b/src/ios/Airship/AirshipResources.bundle/UAOverlayView.nib/objects-11.0+.nib differ diff --git a/src/ios/Airship/AirshipResources.bundle/UAOverlayView.nib/runtime.nib b/src/ios/Airship/AirshipResources.bundle/UAOverlayView.nib/runtime.nib index 9cb53246..6a0c7cbc 100644 Binary files a/src/ios/Airship/AirshipResources.bundle/UAOverlayView.nib/runtime.nib and b/src/ios/Airship/AirshipResources.bundle/UAOverlayView.nib/runtime.nib differ diff --git a/src/ios/Airship/AirshipResources.bundle/UARateAppPromptView.nib b/src/ios/Airship/AirshipResources.bundle/UARateAppPromptView.nib index 3d3efed1..b1f3d9c5 100644 Binary files a/src/ios/Airship/AirshipResources.bundle/UARateAppPromptView.nib and b/src/ios/Airship/AirshipResources.bundle/UARateAppPromptView.nib differ diff --git a/src/ios/Airship/Headers/AirshipLib.h b/src/ios/Airship/Headers/AirshipLib.h index 10a2505e..b6e70a26 100644 --- a/src/ios/Airship/Headers/AirshipLib.h +++ b/src/ios/Airship/Headers/AirshipLib.h @@ -91,6 +91,7 @@ #import "UAInAppMessageFullScreenStyle.h" #import "UAInAppMessageHTMLAdapter.h" #import "UAInAppMessageHTMLDisplayContent.h" +#import "UAInAppMessageHTMLStyle.h" #import "UAInAppMessageManager.h" #import "UAInAppMessageMediaInfo.h" #import "UAInAppMessageMediaStyle.h" diff --git a/src/ios/Airship/Headers/UAInAppMessageAudience.h b/src/ios/Airship/Headers/UAInAppMessageAudience.h index 7276d89b..fa97f60e 100644 --- a/src/ios/Airship/Headers/UAInAppMessageAudience.h +++ b/src/ios/Airship/Headers/UAInAppMessageAudience.h @@ -8,6 +8,25 @@ NS_ASSUME_NONNULL_BEGIN +/** + * Audience check miss behaviors + */ +typedef NS_ENUM(NSInteger, UAInAppMessageAudienceMissBehaviorType) { + /** + * Cancel the message's schedule when the audience check fails. + */ + UAInAppMessageAudienceMissBehaviorCancel, + + /** + * Skip the message's schedule when the audience check fails. + */ + UAInAppMessageAudienceMissBehaviorSkip, + + /** + * Skip and penalize the message's schedule when the audience check fails. + */ + UAInAppMessageAudienceMissBehaviorPenalize, +}; /** * Builder class for UAInAppMessageAudience. @@ -39,6 +58,11 @@ NS_ASSUME_NONNULL_BEGIN */ @property(nonatomic, strong, nullable) UAJSONPredicate *versionPredicate; +/** + * The audience check miss behavior. + */ +@property(nonatomic, assign) UAInAppMessageAudienceMissBehaviorType missBehavior; + /** * Checks if the builder is valid and will produce a audience. * @return YES if the builder is valid, otherwise NO. @@ -77,6 +101,11 @@ NS_ASSUME_NONNULL_BEGIN */ @property(nonatomic, readonly, nullable) UAJSONPredicate *versionPredicate; +/** + * The audience check miss behavior. + */ +@property(nonatomic, readonly, assign) UAInAppMessageAudienceMissBehaviorType missBehavior; + /** * Factory method for building audience model from a builder block. * @@ -85,8 +114,6 @@ NS_ASSUME_NONNULL_BEGIN */ + (instancetype)audienceWithBuilderBlock:(void(^)(UAInAppMessageAudienceBuilder *builder))builderBlock; - - @end NS_ASSUME_NONNULL_END diff --git a/src/ios/Airship/Headers/UAInAppMessageBannerStyle.h b/src/ios/Airship/Headers/UAInAppMessageBannerStyle.h index 61ccee1b..214d1d94 100644 --- a/src/ios/Airship/Headers/UAInAppMessageBannerStyle.h +++ b/src/ios/Airship/Headers/UAInAppMessageBannerStyle.h @@ -80,7 +80,7 @@ extern NSString *const UABannerMaxWidthKey; @property(nonatomic, strong, nullable) UAInAppMessageMediaStyle *mediaStyle; /** - * The max width. + * The max width in points. */ @property(nonatomic, strong, nullable) NSNumber *maxWidth; diff --git a/src/ios/Airship/Headers/UAInAppMessageDisplayContent.h b/src/ios/Airship/Headers/UAInAppMessageDisplayContent.h index f0378c27..db24226c 100644 --- a/src/ios/Airship/Headers/UAInAppMessageDisplayContent.h +++ b/src/ios/Airship/Headers/UAInAppMessageDisplayContent.h @@ -74,6 +74,7 @@ extern NSString *const UAInAppMessageDismissButtonColorKey; extern NSString *const UAInAppMessageFooterKey; extern NSString *const UAInAppMessageDurationKey; extern NSString *const UAInAppMessageModalAllowsFullScreenKey; +extern NSString *const UAInAppMessageHTMLAllowsFullScreenKey; /** diff --git a/src/ios/Airship/Headers/UAInAppMessageHTMLAdapter.h b/src/ios/Airship/Headers/UAInAppMessageHTMLAdapter.h index fa195267..e0413c38 100644 --- a/src/ios/Airship/Headers/UAInAppMessageHTMLAdapter.h +++ b/src/ios/Airship/Headers/UAInAppMessageHTMLAdapter.h @@ -2,10 +2,21 @@ #import #import "UAInAppMessageAdapterProtocol.h" +#import "UAInAppMessageHTMLStyle.h" /** * HTML in-app message display adapter. */ @interface UAInAppMessageHTMLAdapter : NSObject +/** + * HTML in-app message display style defaults plist name. + */ +extern NSString *const UAHTMLStyleFileName; + +/** + * HTML in-app message display style. + */ +@property(nonatomic, strong, nullable) UAInAppMessageHTMLStyle *style; + @end diff --git a/src/ios/Airship/Headers/UAInAppMessageHTMLDisplayContent.h b/src/ios/Airship/Headers/UAInAppMessageHTMLDisplayContent.h index f7495cf4..eae9c7ff 100644 --- a/src/ios/Airship/Headers/UAInAppMessageHTMLDisplayContent.h +++ b/src/ios/Airship/Headers/UAInAppMessageHTMLDisplayContent.h @@ -27,6 +27,17 @@ NS_ASSUME_NONNULL_BEGIN */ @property(nonatomic, copy, nullable) NSString *url; +/** + * The HTML message's border radius. Defaults to 0. + */ +@property(nonatomic, assign) NSUInteger borderRadius; + +/** + * Flag indicating the HTML view should display as full screen on compact devices. + * Defaults to NO. + */ +@property(nonatomic, assign) BOOL allowFullScreenDisplay; + /** * Checks if the builder is valid and will produce an display content instance. * @return YES if the builder is valid, otherwise NO. @@ -55,6 +66,17 @@ NS_ASSUME_NONNULL_BEGIN */ @property(nonatomic, strong, readonly) UIColor *dismissButtonColor; +/** + * The HTML message's border radius. Defaults to 0. + */ +@property(nonatomic, assign, readonly) NSUInteger borderRadius; + +/** + * Flag indicating the HTML view should display as full screen on compact devices. + * Defaults to NO. + */ +@property(nonatomic, assign, readonly) BOOL allowFullScreenDisplay; + /** * Factory method for building HTML display content with a builder block. * diff --git a/src/ios/Airship/Headers/UAInAppMessageHTMLStyle.h b/src/ios/Airship/Headers/UAInAppMessageHTMLStyle.h new file mode 100644 index 00000000..bf8b17a6 --- /dev/null +++ b/src/ios/Airship/Headers/UAInAppMessageHTMLStyle.h @@ -0,0 +1,64 @@ +/* Copyright 2018 Urban Airship and Contributors */ + +#import "UAInAppMessageStyleProtocol.h" +#import "UAPadding.h" +#import "UAInAppMessageTextStyle.h" +#import "UAInAppMessageButtonStyle.h" +#import "UAInAppMessageMediaStyle.h" + +NS_ASSUME_NONNULL_BEGIN + +/** + * The key representing the dismissIconResource in a style plist. + */ +extern NSString *const UAHTMLDismissIconResourceKey; + +/** + * The key representing the additionalPadding in a style plist. + */ +extern NSString *const UAHTMLAdditionalPaddingKey; + +/** + * The key representing the max width in a style plist. + */ +extern NSString *const UAHTMLMaxWidthKey; + +/** + * The key representing the max height in a style plist. + */ +extern NSString *const UAHTMLMaxHeightKey; + +/** + * Model object representing a custom style to be applied + * to HTML in-app messages. + */ +@interface UAInAppMessageHTMLStyle : NSObject + +///--------------------------------------------------------------------------------------- +/// @name HTML Style Properties +///--------------------------------------------------------------------------------------- + +/** + * The constants added to the default spacing between a view and its parent. + */ +@property(nonatomic, strong) UAPadding *additionalPadding; + +/** + * The dismiss icon image resource name. + */ +@property(nonatomic, strong, nullable) NSString *dismissIconResource; + +/** + * The max width in points. + */ +@property(nonatomic, strong, nullable) NSNumber *maxWidth; + +/** + * The max height in points. + */ +@property(nonatomic, strong, nullable) NSNumber *maxHeight; + +@end + +NS_ASSUME_NONNULL_END + diff --git a/src/ios/Airship/Headers/UAInAppMessageModalStyle.h b/src/ios/Airship/Headers/UAInAppMessageModalStyle.h index d4329eef..022fa309 100644 --- a/src/ios/Airship/Headers/UAInAppMessageModalStyle.h +++ b/src/ios/Airship/Headers/UAInAppMessageModalStyle.h @@ -74,12 +74,12 @@ extern NSString *const UAModalMaxHeightKey; @property(nonatomic, strong, nullable) NSString *dismissIconResource; /** - * The max width. + * The max width in points. */ @property(nonatomic, strong, nullable) NSNumber *maxWidth; /** - * The max height. + * The max height in points. */ @property(nonatomic, strong, nullable) NSNumber *maxHeight; diff --git a/src/ios/Airship/Headers/UAScheduleInfo.h b/src/ios/Airship/Headers/UAScheduleInfo.h index f7113db8..e5430ba5 100644 --- a/src/ios/Airship/Headers/UAScheduleInfo.h +++ b/src/ios/Airship/Headers/UAScheduleInfo.h @@ -27,14 +27,16 @@ extern NSUInteger const UAScheduleInfoMaxTriggers; @property(nonatomic, assign) NSInteger priority; /** - * Number of times the actions will be triggered until the schedule is - * finished. + * The max number of times the schedule may be executed. + * + * For in-app messages, if the audience condition checks fail, and + * the miss behavior is `skip`, the triggered schedule will not count towards + * the limit. */ @property(nonatomic, assign) NSUInteger limit; /** - * Array of triggers. Triggers define conditions on when to run - * the actions. + * Array of triggers. Triggers define conditions on when to execute the schedule. */ @property(nonatomic, strong, nullable) NSArray *triggers; @@ -82,14 +84,16 @@ extern NSUInteger const UAScheduleInfoMaxTriggers; @property(nonatomic, readonly) NSInteger priority; /** - * Array of triggers. Triggers define conditions on when to run - * the actions. + * Array of triggers. Triggers define conditions on when to execute the schedule. */ @property(nonatomic, readonly) NSArray *triggers; /** - * Number of times the actions will be triggered until the schedule is - * canceled. + * The max number of times the schedule may be executed. + * + * For in-app messages, if the audience condition checks fail, and + * the miss behavior is `skip`, the triggered schedule will not count towards + * the limit. */ @property(nonatomic, readonly) NSUInteger limit; diff --git a/src/ios/Airship/libUAirship-9.3.3.a b/src/ios/Airship/libUAirship-9.3.3.a deleted file mode 100644 index 5cb40d89..00000000 Binary files a/src/ios/Airship/libUAirship-9.3.3.a and /dev/null differ diff --git a/src/ios/Airship/libUAirship-9.4.0.a b/src/ios/Airship/libUAirship-9.4.0.a new file mode 100644 index 00000000..3d287f00 --- /dev/null +++ b/src/ios/Airship/libUAirship-9.4.0.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1b8298cc16c1e7057cb9f2dd0e747b697c0657ce313dd3c0266979142d6a989a +size 105743984