Skip to content

Commit

Permalink
Merge branch 'master' into version-6.5.8-beta
Browse files Browse the repository at this point in the history
  • Loading branch information
Evan Greer committed Dec 10, 2024
2 parents 13d8074 + e5de2b7 commit d7c35be
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ platform :ios do
)

github_release = set_github_release(
repository_name: "Iterable/swift-sdk",
repository_name: "Iterable/iterable-swift-sdk",
api_token: github_token,
name: "#{version}",
tag_name: "#{version}",
Expand Down Expand Up @@ -135,4 +135,4 @@ platform :ios do
slack_url: slack_webhook,
)
end
end
end
5 changes: 5 additions & 0 deletions swift-sdk/Constants.swift
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,11 @@ enum Const {
static let location = "Location"
static let setCookie = "Set-Cookie"
}

enum RemoteNotification {
static let aps = "aps"
static let contentAvailable = "content-available"
}
}

enum JsonKey {
Expand Down
9 changes: 9 additions & 0 deletions swift-sdk/Internal/InternalIterableAPI.swift
Original file line number Diff line number Diff line change
Expand Up @@ -706,7 +706,16 @@ final class InternalIterableAPI: NSObject, PushTrackerProtocol, AuthProvider {
guard let launchOptions = launchOptions else {
return
}

if let remoteNotificationPayload = launchOptions[UIApplication.LaunchOptionsKey.remoteNotification] as? [AnyHashable: Any] {

if let aps = remoteNotificationPayload[Const.RemoteNotification.aps] as? [String: Any],
let contentAvailable = aps[Const.RemoteNotification.contentAvailable] as? Int,
contentAvailable == 1 {
ITBInfo("Received push notification with wakey content-available flag")
return
}

if let _ = IterableUtil.rootViewController {
// we are ready
IterableAppIntegration.implementation?.performDefaultNotificationAction(remoteNotificationPayload)
Expand Down

0 comments on commit d7c35be

Please sign in to comment.