Skip to content

Commit

Permalink
Update version to 8.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
BrandonStalnaker committed Feb 9, 2023
1 parent 721cd56 commit 64d5e0a
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 35 deletions.
34 changes: 14 additions & 20 deletions Sources/mParticle-Appboy/MPKitAppboy.m
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
#import "MPKitAppboy.h"

#if SWIFT_PACKAGE
#if TARGET_OS_IOS == 1
#ifdef TARGET_OS_IOS
import BrazeKit
import BrazeKitCompat
import BrazeUI
#elif TARGET_OS_TV == 1
#else
import BrazeKit
import BrazeKitCompat
#endif
#else
#if TARGET_OS_IOS == 1
#ifdef TARGET_OS_IOS
@import BrazeKit;
@import BrazeKitCompat;
@import BrazeUI;
#elif TARGET_OS_TV == 1
#else
@import BrazeKit;
@import BrazeKitCompat;
#endif
Expand Down Expand Up @@ -51,7 +51,9 @@
// User Attribute key with reserved functionality for Braze kit
static NSString *const brazeUserAttributeDob = @"dob";

#ifdef TARGET_OS_IOS
__weak static id<BrazeInAppMessageUIDelegate> inAppMessageControllerDelegate = nil;
#endif
__weak static id<BrazeDelegate> urlDelegate = nil;

@interface MPKitAppboy() {
Expand All @@ -77,13 +79,15 @@ + (void)load {
[MParticle registerExtension:kitRegister];
}

#ifdef TARGET_OS_IOS
+ (void)setInAppMessageControllerDelegate:(id)delegate {
inAppMessageControllerDelegate = (id<BrazeInAppMessageUIDelegate>)delegate;
}

+ (id<BrazeInAppMessageUIDelegate>)inAppMessageControllerDelegate {
return inAppMessageControllerDelegate;
}
#endif

+ (void)setURLDelegate:(id)delegate {
urlDelegate = (id<BrazeDelegate>)delegate;
Expand Down Expand Up @@ -254,7 +258,7 @@ - (MPKitExecStatus *)didFinishLaunchingWithConfiguration:(NSDictionary *)configu
_host = configuration[hostConfigKey];
_enableTypeDetection = [configuration[enableTypeDetectionKey] boolValue];

//If Braze is already initialize, immediately "start" the kit, this
//If Braze is already initialized, immediately "start" the kit, this
//is here for:
// 1. Apps that initialize Braze prior to mParticle, and/or
// 2. Apps that initialize mParticle too late, causing the SDK to miss
Expand Down Expand Up @@ -298,7 +302,7 @@ - (void)start {
[self->appboyInstance setAdTrackingEnabled:[self isAdvertisingTrackingEnabled]];
}

#if TARGET_OS_IOS == 1
#ifdef TARGET_OS_IOS
if ([MPKitAppboy inAppMessageControllerDelegate]) {
BrazeInAppMessageUI *inAppMessageUI = [[BrazeInAppMessageUI alloc] init];
inAppMessageUI.delegate = [MPKitAppboy inAppMessageControllerDelegate];
Expand Down Expand Up @@ -367,7 +371,7 @@ - (void)start {
optionsDictionary[ABKSDKFlavorKey] = @(MPARTICLE);
#pragma clang diagnostic pop

#if TARGET_OS_IOS == 1
#ifdef TARGET_OS_IOS
optionsDictionary[ABKEnableAutomaticLocationCollectionKey] = @(YES);
if (self.configuration[@"ABKDisableAutomaticLocationCollectionKey"]) {
if ([self.configuration[@"ABKDisableAutomaticLocationCollectionKey"] caseInsensitiveCompare:@"true"] == NSOrderedSame) {
Expand All @@ -377,16 +381,6 @@ - (void)start {
#pragma clang diagnostic pop
}
}
#elif TARGET_OS_TVOS == 1
optionsDictionary[ABKDisableAutomaticLocationCollectionKey] = @(NO);
if (self.configuration[@"ABKDisableAutomaticLocationCollectionKey"]) {
if ([self.configuration[@"ABKDisableAutomaticLocationCollectionKey"] caseInsensitiveCompare:@"true"] == NSOrderedSame) {
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
optionsDictionary[ABKDisableAutomaticLocationCollectionKey] = @(YES);
#pragma clang diagnostic pop
}
}
#endif

if ([MPKitAppboy urlDelegate]) {
Expand Down Expand Up @@ -498,7 +492,7 @@ - (MPKitExecStatus *)logScreen:(MPEvent *)event {
- (MPKitExecStatus *)receivedUserNotification:(NSDictionary *)userInfo {
MPKitExecStatus *execStatus = [[MPKitExecStatus alloc] initWithSDKCode:@(MPKitInstanceAppboy) returnCode:MPKitReturnCodeSuccess];

#if TARGET_OS_IOS == 1
#ifdef TARGET_OS_IOS
if (![appboyInstance.notifications handleBackgroundNotificationWithUserInfo:userInfo fetchCompletionHandler:^(UIBackgroundFetchResult fetchResult) {}]) {
execStatus = [[MPKitExecStatus alloc] initWithSDKCode:@(MPKitInstanceAppboy) returnCode:MPKitReturnCodeFail];
}
Expand All @@ -515,7 +509,7 @@ - (MPKitExecStatus *)removeUserAttribute:(NSString *)key {
}

- (MPKitExecStatus *)setDeviceToken:(NSData *)deviceToken {
#if TARGET_OS_IOS == 1
#ifdef TARGET_OS_IOS
[appboyInstance.notifications registerDeviceToken:deviceToken];
#endif

Expand Down Expand Up @@ -868,7 +862,7 @@ - (MPKitExecStatus *)setUserIdentity:(NSString *)identityString identityType:(MP
return [[MPKitExecStatus alloc] initWithSDKCode:@(MPKitInstanceAppboy) returnCode:MPKitReturnCodeSuccess];
}

#if TARGET_OS_IOS == 1 && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0
#ifdef TARGET_OS_IOS
- (nonnull MPKitExecStatus *)userNotificationCenter:(nonnull UNUserNotificationCenter *)center didReceiveNotificationResponse:(nonnull UNNotificationResponse *)response API_AVAILABLE(ios(10.0)) {
MPKitExecStatus *execStatus = [[MPKitExecStatus alloc] initWithSDKCode:@(MPKitInstanceAppboy) returnCode:MPKitReturnCodeSuccess];

Expand Down
24 changes: 9 additions & 15 deletions mParticle-Appboy.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "mParticle-Appboy"
s.version = "8.0.16"
s.version = "8.1.0"
s.summary = "Appboy integration for mParticle"

s.description = <<-DESC
Expand All @@ -12,29 +12,23 @@ Pod::Spec.new do |s|
s.author = { "mParticle" => "[email protected]" }
s.source = { :git => "https://github.com/mparticle-integrations/mparticle-apple-integration-appboy.git", :tag => s.version.to_s }
s.social_media_url = "https://twitter.com/mparticle"
s.static_framework = true

s.ios.deployment_target = "9.0"
s.ios.deployment_target = "11.0"
s.ios.source_files = 'Sources/**/*.{h,m,mm}'
s.ios.dependency 'mParticle-Apple-SDK/mParticle', '~> 8.0'
s.ios.frameworks = 'CoreTelephony', 'SystemConfiguration'
s.libraries = 'z'
s.ios.dependency 'BrazeKit', '~> 5.9'
s.ios.dependency 'BrazeKitCompat', '~> 5.9'
s.ios.dependency 'BrazeUI', '~> 5.9'

s.tvos.deployment_target = "9.0"
s.tvos.source_files = 'Sources/**/*.{h,m,mm}'
s.tvos.dependency 'mParticle-Apple-SDK/mParticle', '~> 8.0'
s.tvos.frameworks = 'SystemConfiguration'
s.tvos.dependency 'BrazeKit', '~> 5.9'
s.tvos.dependency 'BrazeKitCompat', '~> 5.9'

s.tvos.pod_target_xcconfig = {
'EXCLUDED_ARCHS[sdk=appletvsimulator*]' => 'arm64'
}
s.tvos.user_target_xcconfig = {
'EXCLUDED_ARCHS[sdk=appletvsimulator*]' => 'arm64'
}
# s.tvos.deployment_target = "11.0"
# s.tvos.source_files = 'Sources/**/*.{h,m,mm}'
# s.tvos.dependency 'mParticle-Apple-SDK/mParticle', '~> 8.0'
# s.tvos.frameworks = 'SystemConfiguration'
# s.tvos.dependency 'BrazeKit', '~> 5.9'
# s.tvos.dependency 'BrazeKitCompat', '~> 5.9'


end

0 comments on commit 64d5e0a

Please sign in to comment.