Skip to content

Commit

Permalink
feat: Update to Latest Version of Airship
Browse files Browse the repository at this point in the history
  • Loading branch information
BrandonStalnaker committed Jan 3, 2024
1 parent 7c2a1e8 commit b2c5245
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
4 changes: 2 additions & 2 deletions mParticle-UrbanAirship.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ Pod::Spec.new do |s|
s.source = { :git => "https://github.com/mparticle-integrations/mparticle-apple-integration-urbanairship.git", :tag => "v" + s.version.to_s }
s.social_media_url = "https://twitter.com/mparticle"

s.ios.deployment_target = "11.0"
s.ios.deployment_target = "14.0"
s.ios.source_files = 'mParticle-UrbanAirship/*.{h,m,mm}'
s.ios.dependency 'mParticle-Apple-SDK/mParticle', '~> 8.0'
s.ios.dependency 'Airship', '~> 16.7'
s.ios.dependency 'Airship', '~> 17.7'
end

9 changes: 1 addition & 8 deletions mParticle-UrbanAirship/MPKitUrbanAirship.m
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,6 @@ - (MPKitExecStatus *)setUserAttribute:(NSString *)key value:(NSString *)value {

if (uaTag) {
[[UAirship channel] addTag:uaTag];
[[UAirship channel] updateRegistration];

returnCode = MPKitReturnCodeSuccess;
} else {
Expand All @@ -370,7 +369,6 @@ - (MPKitExecStatus *)setUserTag:(NSString *)tag {

if (uaTag) {
[[UAirship channel] addTag:uaTag];
[[UAirship channel] updateRegistration];

returnCode = MPKitReturnCodeSuccess;
} else {
Expand Down Expand Up @@ -398,7 +396,6 @@ - (nonnull MPKitExecStatus *)removeUserAttribute:(nonnull NSString *)key {
[editor removeTag:key];
[editor apply];
}];
[[UAirship channel] updateRegistration];

returnCode = MPKitReturnCodeSuccess;
} else {
Expand Down Expand Up @@ -468,7 +465,7 @@ - (BOOL)setNamedUser:(NSString *)identityString identityType:(MPUserIdentity)ide
return NO;
}

[UAirship namedUser].identifier = identityString;
[UAirship.contact identify:identityString];
return YES;
}

Expand Down Expand Up @@ -669,7 +666,6 @@ - (void)setTagMappings:(NSArray<MPUATagMapping *> *)tagMappings forCommerceEvent
if (matchTagMappings.count > 0) {
[matchTagMappings enumerateObjectsUsingBlock:^(MPUATagMapping * _Nonnull tagMapping, NSUInteger idx, BOOL * _Nonnull stop) {
[[UAirship channel] addTag:tagMapping.value];
[[UAirship channel] updateRegistration];
}];
}
}
Expand All @@ -688,7 +684,6 @@ - (void)setTagMappings:(NSArray<MPUATagMapping *> *)tagMappings forEvent:(MPEven
if (matchTagMappings.count > 0) {
[matchTagMappings enumerateObjectsUsingBlock:^(MPUATagMapping * _Nonnull tagMapping, NSUInteger idx, BOOL * _Nonnull stop) {
[[UAirship channel] addTag:tagMapping.value];
[[UAirship channel] updateRegistration];
}];
}
}
Expand Down Expand Up @@ -725,7 +720,6 @@ - (void)setTagMappings:(NSArray<MPUATagMapping *> *)tagMappings forAttributesInC
NSString *tagPlusAttributeValue = [NSString stringWithFormat:@"%@-%@", tagMapping.value, attributeString];
[[UAirship channel] addTag:tagPlusAttributeValue];
[[UAirship channel] addTag:tagMapping.value];
[[UAirship channel] updateRegistration];
}
}];
}
Expand Down Expand Up @@ -754,7 +748,6 @@ - (void)setTagMappings:(NSArray<MPUATagMapping *> *)tagMappings forAttributesInE
NSString *tagPlusAttributeValue = [NSString stringWithFormat:@"%@-%@", tagMapping.value, attributeString];
[[UAirship channel] addTag:tagPlusAttributeValue];
[[UAirship channel] addTag:tagMapping.value];
[[UAirship channel] updateRegistration];
}
}];
}
Expand Down

0 comments on commit b2c5245

Please sign in to comment.