From a9d3e0792460db65a3891ab73b97860851202aa0 Mon Sep 17 00:00:00 2001 From: Daniel Hok Date: Tue, 28 Jul 2020 14:08:47 -0400 Subject: [PATCH] Updating Braze SDK --- Appboy-iOS-SDK.podspec | 8 +- .../ABKIdentifierForAdvertisingProvider.m | 71 ------------------ AppboyKit/Appboy.bundle/Info.plist | Bin 674 -> 678 bytes .../ABKIdentifierForAdvertisingProvider.h | 22 ------ AppboyKit/headers/AppboyKitLibrary/Appboy.h | 2 +- .../headers/AppboyKitLibrary/AppboyKit.h | 1 - CHANGELOG.md | 28 +++++-- .../Advanced/Misc/MiscViewController.m | 9 ++- Example/Stopwatch/Supporting Files/Info.plist | 2 +- 9 files changed, 35 insertions(+), 108 deletions(-) delete mode 100644 AppboyKit/ABKIdentifierForAdvertisingProvider.m delete mode 100644 AppboyKit/headers/AppboyKitLibrary/ABKIdentifierForAdvertisingProvider.h diff --git a/Appboy-iOS-SDK.podspec b/Appboy-iOS-SDK.podspec index a5fe54e11..19651a676 100644 --- a/Appboy-iOS-SDK.podspec +++ b/Appboy-iOS-SDK.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "Appboy-iOS-SDK" - s.version = "3.26.0" + s.version = "3.27.0-beta1" s.summary = "This is the Braze iOS SDK for Mobile Marketing Automation" s.homepage = "http://www.braze.com" s.license = { :type => 'Commercial', :text => 'Please refer to https://github.com/Appboy/appboy-ios-sdk/blob/master/LICENSE'} @@ -35,20 +35,20 @@ Pod::Spec.new do |s| snf.source_files = 'AppboyUI/ABKNewsFeed/*.*', 'AppboyUI/ABKNewsFeed/ViewControllers/**/*.*', 'AppboyUI/ABKUIUtils/**/*.*', 'AppboyKit/ABKSDWebImageProxy.m' snf.resource = 'AppboyUI/ABKNewsFeed/Resources/**/*.*' snf.dependency 'Appboy-iOS-SDK/Core' - snf.dependency 'SDWebImage', '~>5.0' + snf.dependency 'SDWebImage', '~>5.8.2' end s.subspec 'InAppMessage' do |siam| siam.source_files = 'AppboyUI/ABKUIUtils/**/*.*', 'AppboyUI/ABKInAppMessage/*.*', 'AppboyUI/ABKInAppMessage/ViewControllers/*.*', 'AppboyKit/ABKSDWebImageProxy.m' siam.resource = 'AppboyUI/ABKInAppMessage/Resources/*.*' siam.dependency 'Appboy-iOS-SDK/Core' - siam.dependency 'SDWebImage', '~>5.0' + siam.dependency 'SDWebImage', '~>5.8.2' end s.subspec 'ContentCards' do |scc| scc.source_files = 'AppboyUI/ABKContentCards/*.*', 'AppboyUI/ABKContentCards/ViewControllers/**/*.*', 'AppboyUI/ABKUIUtils/**/*.*', 'AppboyKit/ABKSDWebImageProxy.m' scc.resource = 'AppboyUI/ABKContentCards/Resources/**/*.*' scc.dependency 'Appboy-iOS-SDK/Core' - scc.dependency 'SDWebImage', '~>5.0' + scc.dependency 'SDWebImage', '~>5.8.2' end end diff --git a/AppboyKit/ABKIdentifierForAdvertisingProvider.m b/AppboyKit/ABKIdentifierForAdvertisingProvider.m deleted file mode 100644 index ac98edb48..000000000 --- a/AppboyKit/ABKIdentifierForAdvertisingProvider.m +++ /dev/null @@ -1,71 +0,0 @@ -#import -#import "ABKIdentifierForAdvertisingProvider.h" - -/*! - * Do not call these methods within your code. They are meant for Braze internal use only. - */ - -/*! - * ABKIdentifierForAdvertisingProvider.m and ABKIdentifierForAdvertisingProvider.h must be added to your project - * regardless of whether or not you enable collection. This occurs automatically if you integrate/update via the CocoaPod. - */ - -@implementation ABKIdentifierForAdvertisingProvider - -/*! - * @discussion Returns the identifier for advertising if AdSupport framework is available and the identifier for - * advertising is enabled. - * - * If you’re using advertising elsewhere in the app or through our in-app News Feed, we recommend continuing to collect - * the IDFA through Braze. You should be able to do so safely without fear of rejection from the iOS App Store. - * The future availability of IDFAs will enable functionality like integrating with other third-party systems, - * including your own servers, and enabling re-targeting of existing users outside of Braze. - * If you continue to record them we will store IDFAs free of charge so you can take advantage of these options - * immediately when they are released without additional development work. - * - * To enable IDFA collection add a PreProcessor Macro to your build settings called ABK_ENABLE_IDFA_COLLECTION=1 - */ -+ (NSString *)getIdentifierForAdvertiser { -#ifdef ABK_ENABLE_IDFA_COLLECTION - ASIdentifierManager *sharedManager = [self getASIdentifierManager]; - if (sharedManager) { - if ([sharedManager isAdvertisingTrackingEnabled]) { - return [[sharedManager advertisingIdentifier] UUIDString]; - } - } -#endif - return nil; -} - -/*! - * @discussion Returns the NSNumber object with IsAdvertisingTrackingEnabled if AdSupport framework is available - * and the user has not disallowed advertising tracking. Note that you can still retrieve the IFA in the case that - * the user has not enabled advertising tracking, but rather the rules surrounding its use become more strict. - */ -+ (NSNumber *)getIsAdvertisingTrackingEnabledAsNSNumber { -#ifdef ABK_ENABLE_IDFA_COLLECTION - ASIdentifierManager *sharedManager = [self getASIdentifierManager]; - if (sharedManager) { - return @([sharedManager isAdvertisingTrackingEnabled]); - } -#endif - return nil; -} - -#ifdef ABK_ENABLE_IDFA_COLLECTION -/*! - * @discussion Returns the [ASIdentifierManager sharedManager] if it is available (i.e. if the app is linked - * against AdSupport framework). - */ -+ (ASIdentifierManager *)getASIdentifierManager { - Class ASIdentifierManagerClass = NSClassFromString(@"ASIdentifierManager"); - if (ASIdentifierManagerClass) { - // Don't use [ASIdentifierManager sharedManager] here so this method doesn't require that the host app link against - // the AdSupport framework. - return [ASIdentifierManagerClass sharedManager]; - } - return nil; -} -#endif - -@end diff --git a/AppboyKit/Appboy.bundle/Info.plist b/AppboyKit/Appboy.bundle/Info.plist index e5ccb1bb50e75e2aa1e7fbbf5d3b079ecddc9d90..c2399d17b7e8cfe65d4e70fe7205fd05e755294e 100644 GIT binary patch delta 110 zcmZ3)x{P(hA4a1HLkmY!V`HP#h|GeF{Jhls;t)dK1jQqUR{NfNpV?EOt7!Sk=F*Gza2sbozH8ZeCo~*~@ b$ - -/*! - * Do not call these methods within your code. They are meant for Braze internal use only. - */ - -/*! - * ABKIdentifierForAdvertisingProvider.m and ABKIdentifierForAdvertisingProvider.h must be added to your project - * regardless of whether or not you enable collection. This occurs automatically if you integrate/update via the CocoaPod. - */ - -/* - * Braze Public API: ABKIdentifierForAdvertisingProvider - */ -NS_ASSUME_NONNULL_BEGIN -@interface ABKIdentifierForAdvertisingProvider : NSObject - -+ (nullable NSString *)getIdentifierForAdvertiser; -+ (nullable NSNumber *)getIsAdvertisingTrackingEnabledAsNSNumber; - -@end -NS_ASSUME_NONNULL_END diff --git a/AppboyKit/headers/AppboyKitLibrary/Appboy.h b/AppboyKit/headers/AppboyKitLibrary/Appboy.h index 8126e8de4..cea367176 100644 --- a/AppboyKit/headers/AppboyKitLibrary/Appboy.h +++ b/AppboyKit/headers/AppboyKitLibrary/Appboy.h @@ -13,7 +13,7 @@ #import #ifndef APPBOY_SDK_VERSION -#define APPBOY_SDK_VERSION @"3.26.0" +#define APPBOY_SDK_VERSION @"3.27.0-beta1" #endif #if !TARGET_OS_TV diff --git a/AppboyKit/headers/AppboyKitLibrary/AppboyKit.h b/AppboyKit/headers/AppboyKitLibrary/AppboyKit.h index 7c7c92a43..056f8c5d0 100644 --- a/AppboyKit/headers/AppboyKitLibrary/AppboyKit.h +++ b/AppboyKit/headers/AppboyKitLibrary/AppboyKit.h @@ -43,7 +43,6 @@ #import "ABKContentCardsController.h" // IDFA -#import "ABKIdentifierForAdvertisingProvider.h" #import "ABKIDFADelegate.h" // SDWebImage diff --git a/CHANGELOG.md b/CHANGELOG.md index 392f06b90..cf8a93e3a 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,19 +1,35 @@ +## 3.27.0-beta1 + +- This release can be used to beta test iOS 14. + +##### Breaking +- Requires Xcode 12. +- Updates the minimum required version of SDWebImage from 5.0 to 5.8.2. +- Removes the `ABK_ENABLE_IDFA_COLLECTION` preprocessor macro from the SDK. + - If you wish to enable IDFA, please use the `ABKIDFADelegate`. + - Integration instructions for supporting iOS 14 in your `ABKIDFADelegate` will be included in a future beta release. + +##### Updated +- Adds support for iOS 14's Approximate Location feature. + - Note that the Geofence feature will not work if the end user chooses to provide only approximate location. + - Optional session-start based location tracking will continue to work. Accuracy will be based on the user's precise vs. approximate choice. + ## 3.26.0 ##### Breaking - Removed readonly property `overrideApplicationStatusBarHiddenState` in `ABKInAppMessageViewController.h`. -##### Changed -- Added Binary Project Specification file for more efficient Carthage integration of the full SDK. - - Update your Cartfile to use `binary "https://raw.githubusercontent.com/Appboy/appboy-ios-sdk/master/appboy_ios_sdk_full.json"` - - Support for this integration method was added starting with version 3.24.0 of the SDK. - ##### Fixed - Fixes an issue with in-app messages not respecting the application's status bar style when _View controller-based status bar appearance_ (`UIViewControllerBasedStatusBarAppearance`) is set to `YES` in the Info.plist. - Fixes an issue which can lead to text being cut off in Content Cards for specific iPhone models. - Fixes an issue preventing test Content Cards from displaying under specific conditions. -#### Added +##### Changed +- Added Binary Project Specification file for more efficient Carthage integration of the full SDK. + - Update your Cartfile to use `binary "https://raw.githubusercontent.com/Appboy/appboy-ios-sdk/master/appboy_ios_sdk_full.json"` + - Support for this integration method was added starting with version 3.24.0 of the SDK. + +##### Added - Adds support for specifying `PushStoryAppGroup` in the `Appboy` dictionary in your app's `Info.plist`. This [Apple App Group](https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_security_application-groups?language=objc) will share the [Braze Push Story](https://www.braze.com/docs/developer_guide/platform_integration_guides/ios/push_story/) information such as Campaign IDs between applications from a single Apple Developer account. - Adds `appboyBridge.getUser().addAlias(alias, label)` to the javascript interface for HTML in-app messages. - Adds the property `overrideUserInterfaceStyle` to `ABKInAppMessage` that allows forcing Light or Dark mode in the same way as Apple's [`UIViewController.overrideUserInterfaceStyle`](https://developer.apple.com/documentation/uikit/uiviewcontroller/3238087-overrideuserinterfacestyle?language=objc). diff --git a/Example/Stopwatch/Sources/ViewControllers/Advanced/Misc/MiscViewController.m b/Example/Stopwatch/Sources/ViewControllers/Advanced/Misc/MiscViewController.m index 08301d8b4..5877b2fd3 100644 --- a/Example/Stopwatch/Sources/ViewControllers/Advanced/Misc/MiscViewController.m +++ b/Example/Stopwatch/Sources/ViewControllers/Advanced/Misc/MiscViewController.m @@ -208,8 +208,13 @@ - (IBAction)logSingleLocation:(id)sender { - (IBAction)manuallyRequestGeofences:(id)sender { CLLocationManager *locationManager = [[CLLocationManager alloc] init]; locationManager.delegate = self; - CLAuthorizationStatus authorizationStatus = [CLLocationManager authorizationStatus]; - + CLAuthorizationStatus authorizationStatus; + if (@available(iOS 14.0, *)) { + authorizationStatus = [locationManager authorizationStatus]; + } else { + authorizationStatus = [CLLocationManager authorizationStatus]; + } + if (authorizationStatus == kCLAuthorizationStatusAuthorizedAlways || authorizationStatus == kCLAuthorizationStatusAuthorizedWhenInUse) { [self showAlertWithMessage:@"Manually requesting Geofences."]; diff --git a/Example/Stopwatch/Supporting Files/Info.plist b/Example/Stopwatch/Supporting Files/Info.plist index cff400171..183707c3c 100644 --- a/Example/Stopwatch/Supporting Files/Info.plist +++ b/Example/Stopwatch/Supporting Files/Info.plist @@ -24,7 +24,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 3.26.0 + 3.27.0-beta1 CFBundleSignature ???? CFBundleURLTypes