Skip to content

Commit d7c35be

Browse files
author
Evan Greer
committed
Merge branch 'master' into version-6.5.8-beta
2 parents 13d8074 + e5de2b7 commit d7c35be

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

fastlane/Fastfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ platform :ios do
101101
)
102102

103103
github_release = set_github_release(
104-
repository_name: "Iterable/swift-sdk",
104+
repository_name: "Iterable/iterable-swift-sdk",
105105
api_token: github_token,
106106
name: "#{version}",
107107
tag_name: "#{version}",
@@ -135,4 +135,4 @@ platform :ios do
135135
slack_url: slack_webhook,
136136
)
137137
end
138-
end
138+
end

swift-sdk/Constants.swift

+5
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,11 @@ enum Const {
9595
static let location = "Location"
9696
static let setCookie = "Set-Cookie"
9797
}
98+
99+
enum RemoteNotification {
100+
static let aps = "aps"
101+
static let contentAvailable = "content-available"
102+
}
98103
}
99104

100105
enum JsonKey {

swift-sdk/Internal/InternalIterableAPI.swift

+9
Original file line numberDiff line numberDiff line change
@@ -706,7 +706,16 @@ final class InternalIterableAPI: NSObject, PushTrackerProtocol, AuthProvider {
706706
guard let launchOptions = launchOptions else {
707707
return
708708
}
709+
709710
if let remoteNotificationPayload = launchOptions[UIApplication.LaunchOptionsKey.remoteNotification] as? [AnyHashable: Any] {
711+
712+
if let aps = remoteNotificationPayload[Const.RemoteNotification.aps] as? [String: Any],
713+
let contentAvailable = aps[Const.RemoteNotification.contentAvailable] as? Int,
714+
contentAvailable == 1 {
715+
ITBInfo("Received push notification with wakey content-available flag")
716+
return
717+
}
718+
710719
if let _ = IterableUtil.rootViewController {
711720
// we are ready
712721
IterableAppIntegration.implementation?.performDefaultNotificationAction(remoteNotificationPayload)

0 commit comments

Comments
 (0)