Skip to content

Commit

Permalink
Prepare release 17.10.1 (#3076)
Browse files Browse the repository at this point in the history
* Update version

* Update changelog

* Handle lowercased contact ID

* typo

* Update changelog

---------

Co-authored-by: Ryan Lepinski <ryan.lepinski@airship.com>
Co-authored-by: Ulrich GIBERNE <ulrich.giberne@airship.com>
  • Loading branch information
3 people committed Apr 23, 2024
1 parent 10a43dc commit 9aa3d73
Show file tree
Hide file tree
Showing 10 changed files with 41 additions and 21 deletions.
2 changes: 1 addition & 1 deletion Airship.podspec
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
AIRSHIP_VERSION="17.10.0"
AIRSHIP_VERSION="17.10.1"

Pod::Spec.new do |s|
s.version = AIRSHIP_VERSION
Expand Down
2 changes: 1 addition & 1 deletion Airship/AirshipConfig.xcconfig
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//* Copyright Airship and Contributors */

CURRENT_PROJECT_VERSION = 17.10.0
CURRENT_PROJECT_VERSION = 17.10.1

// Uncomment to include the preview build warning
// OTHER_CFLAGS = $(inherited) -DUA_PREVIEW=1
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"ua_notification_button_send_info" = "Stuur Info";
"ua_notification_button_share" = "Deel";
"ua_notification_button_shop_now" = "Winkel nu";
"ua_notification_button_tell_me_more" = "Vertel Mij Neer";
"ua_notification_button_tell_me_more" = "Vertel Mij Meer";
"ua_notification_button_unfollow" = "Ontvolg";
"ua_notification_button_yes" = "Ja";
"ua_ok" = "OK";
Expand Down
2 changes: 1 addition & 1 deletion Airship/AirshipCore/Source/AirshipVersion.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import Foundation

@objc(UAirshipVersion)
public class AirshipVersion: NSObject {
public static let version = "17.10.0"
public static let version = "17.10.1"

@objc
public class func get() -> String {
Expand Down
29 changes: 15 additions & 14 deletions Airship/AirshipCore/Source/ContactManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,14 @@ actor ContactManager: ContactManagerProtocol {
}

private var possiblyOrphanedContactID: String? {
guard let lastContactInfo = self.lastContactInfo,
lastContactInfo.isAnonymous,
(anonData?.channels.isEmpty ?? true)
else {
return nil
}
guard let lastContactInfo = self.lastContactInfo,
lastContactInfo.isAnonymous,
(anonData?.channels.isEmpty ?? true)
else {
return nil
}

return lastContactInfo.contactID
return lastContactInfo.contactID
}

init(
Expand Down Expand Up @@ -154,7 +154,7 @@ actor ContactManager: ContactManagerProtocol {
}

self.lastContactInfo = InternalContactInfo(
contactID: UUID().uuidString,
contactID: UUID().uuidString.lowercased(),
isAnonymous: true,
namedUserID: nil,
channelAssociatedDate: self.date.now,
Expand Down Expand Up @@ -742,8 +742,12 @@ actor ContactManager: ContactManagerProtocol {
expiration: expiration
)


// Doing a lowercased check so if backend normalizes the contact ID we wont lose data.
let isNewContactID = lastContactInfo?.contactID.lowercased() != result.contact.contactID.lowercased()

var resolvedNamedUser = namedUserID
if resolvedNamedUser == nil, lastContactInfo?.contactID == result.contact.contactID {
if !isNewContactID, resolvedNamedUser == nil {
resolvedNamedUser = lastContactInfo?.namedUserID
}

Expand All @@ -756,7 +760,7 @@ actor ContactManager: ContactManagerProtocol {
)

// Conflict events
if newContactInfo.contactID != self.lastContactInfo?.contactID,
if isNewContactID,
self.lastContactInfo?.isAnonymous == true,
let anonData = self.anonData,
!anonData.isEmpty
Expand All @@ -783,10 +787,7 @@ actor ContactManager: ContactManagerProtocol {
// If we have a resolve that returns a new contactID then it means
// it was changed server side. Clear any pending operations that are
// older than the resolve date.
if self.lastContactInfo != nil,
lastContactInfo?.contactID != newContactInfo.contactID,
operationType == .resolve {

if self.lastContactInfo != nil, isNewContactID, operationType == .resolve {
self.operationEntries = self.operationEntries.filter { entry in
if (result.contact.channelAssociatedDate < entry.date) {
return true
Expand Down
10 changes: 10 additions & 0 deletions Airship/AirshipCore/Tests/ContactManagerTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -604,6 +604,9 @@ final class ContactManagerTest: XCTestCase {
contactInfo = await self.contactManager.currentContactIDInfo()
XCTAssertNotNil(contactInfo)


XCTAssertEqual(contactInfo!.contactID.lowercased(), contactInfo!.contactID)

await self.verifyUpdates([
.contactIDUpdate(
ContactIDInfo(
Expand All @@ -615,6 +618,13 @@ final class ContactManagerTest: XCTestCase {
])
}

func testGenerateDefaultContactInfoLowercasedID() async {
await self.contactManager.generateDefaultContactIDIfNotSet()
let contactInfo = await self.contactManager.currentContactIDInfo()
XCTAssertNotNil(contactInfo)
XCTAssertEqual(contactInfo!.contactID.lowercased(), contactInfo!.contactID)
}

func testGenerateDefaultContactInfoAlreadySet() async throws {
await self.contactManager.addOperation(.resolve)
self.apiClient.resolveCallback = { channelID, contactID, possiblyOrphanedContactID in
Expand Down
2 changes: 1 addition & 1 deletion AirshipContentExtension.podspec
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
AIRSHIP_VERSION="17.10.0"
AIRSHIP_VERSION="17.10.1"

Pod::Spec.new do |s|
s.version = AIRSHIP_VERSION
Expand Down
2 changes: 1 addition & 1 deletion AirshipDebug.podspec
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
AIRSHIP_VERSION="17.10.0"
AIRSHIP_VERSION="17.10.1"

Pod::Spec.new do |s|
s.version = AIRSHIP_VERSION
Expand Down
2 changes: 1 addition & 1 deletion AirshipServiceExtension.podspec
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
AIRSHIP_VERSION="17.10.0"
AIRSHIP_VERSION="17.10.1"

Pod::Spec.new do |s|
s.version = AIRSHIP_VERSION
Expand Down
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@

[Migration Guides](https://github.com/urbanairship/ios-library/tree/main/Documentation/Migration)

## Version 17.10.1, April 23, 2024
Patch release with a bug fix for handling lowercased contact ID and contact operations queue.
- Fixes un issue with handling contact operations queue and lowercased contact ID.
- Fixes a notification button typo.

### Changes
- Added `resetEnabledFeatures` config option
- Fixes color theme assignment for the delete button in Message Center and back button in message views.

## Version 17.10.0, April 4, 2024
Minor release with a new config option `resetEnabledFeatures` to reset the PrivacyManager enabled features to those specified in the Airship config on each launch and a bug fix for the delete button theming in the Message Center and back button theming in message views.

Expand Down

0 comments on commit 9aa3d73

Please sign in to comment.