Skip to content

Commit e104599

Browse files
authored
Merge branch 'master' into chore/update-podspec
2 parents 4dc0833 + 885d255 commit e104599

31 files changed

+523
-197
lines changed

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,22 @@
33
All notable changes to this project will be documented in this file.
44
This project adheres to [Semantic Versioning](http://semver.org/).
55

6+
## [6.5.7]
7+
### Fixed
8+
- Fixed deeplink re-routing issue where delegate would only return `false` value. Thanks to @scottasoutherland :)
9+
10+
## [6.5.6]
11+
### Fixed
12+
- Fixed an issue where push notification were not being delivered in iOS 18 beta Sandbox builds.
13+
14+
## [6.5.5]
15+
### Added
16+
- Introduced a new configuration option, `RetryPolicy`, in IterableConfig to set the retry policy for JWT token refresh.
17+
- Added the method `pauseAuthRetries(_ pauseRetry: Bool)` to allow pausing the SDK from requesting JWT tokens from the app.
18+
19+
### Changed
20+
- Updated the method `onTokenRegistrationFailed(_ reason: String?)` to `onAuthFailure(_ authFailure: AuthFailure)`. The new `AuthFailure` object provides more detailed information about JWT failures.
21+
622
## [6.5.4]
723
### Fixed
824
- SDK is now compatible with Xcode 16 beta 2

Iterable-iOS-AppExtensions.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Pod::Spec.new do |s|
22
s.name = "Iterable-iOS-AppExtensions"
33
s.module_name = "IterableAppExtensions"
4-
s.version = "6.5.4"
4+
s.version = "6.5.7"
55
s.summary = "App Extensions for Iterable SDK"
66

77
s.description = <<-DESC

Iterable-iOS-SDK.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Pod::Spec.new do |s|
22
s.name = "Iterable-iOS-SDK"
33
s.module_name = "IterableSDK"
4-
s.version = "6.5.4"
4+
s.version = "6.5.7"
55
s.summary = "Iterable's official SDK for iOS"
66

77
s.description = <<-DESC

sample-apps/objc-sample-app/objc-sample-app/AppDelegate.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ - (BOOL)handleIterableURL:(NSURL *)url context:(IterableActionContext *)context
134134
- (BOOL)handleIterableCustomAction:(IterableAction *)action context:(IterableActionContext *)context {
135135
if ([action.type isEqualToString:@"handleFindCoffee"]) {
136136
if (action.userInput != nil) {
137-
NSString *urlString = [[NSString alloc] initWithFormat:@"https://majumder.me/coffee?q=%@", action.userInput];
137+
NSString *urlString = [[NSString alloc] initWithFormat:@"https://example.com/coffee?q=%@", action.userInput];
138138
NSURL *url = [[NSURL alloc] initWithString:urlString];
139139
return [DeepLinkHandler handleURL:url];
140140
}

sample-apps/objc-sample-app/objc-sample-app/objc-sample-app.entitlements

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
<string>development</string>
77
<key>com.apple.developer.associated-domains</key>
88
<array>
9-
<string>applinks:majumder.me</string>
10-
<string>applinks:links.majumder.me</string>
9+
<string>applinks:example.com</string>
10+
<string>applinks:links.example.com</string>
1111
</array>
1212
</dict>
1313
</plist>

sample-apps/swift-sample-app/swift-sample-app.xcodeproj/project.pbxproj

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -489,13 +489,13 @@
489489
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
490490
CODE_SIGN_ENTITLEMENTS = "swift-sample-app/swift-sample-app.entitlements";
491491
CODE_SIGN_STYLE = Automatic;
492-
DEVELOPMENT_TEAM = BP98Z28R86;
492+
DEVELOPMENT_TEAM = "";
493493
INFOPLIST_FILE = "swift-sample-app/Info.plist";
494494
LD_RUNPATH_SEARCH_PATHS = (
495495
"$(inherited)",
496496
"@executable_path/Frameworks",
497497
);
498-
PRODUCT_BUNDLE_IDENTIFIER = "iterable.swift-sample-app";
498+
PRODUCT_BUNDLE_IDENTIFIER = "com.example.iterable.swift-sample-app";
499499
PRODUCT_NAME = "$(TARGET_NAME)";
500500
SWIFT_VERSION = 5.0;
501501
TARGETED_DEVICE_FAMILY = "1,2";
@@ -508,13 +508,13 @@
508508
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
509509
CODE_SIGN_ENTITLEMENTS = "swift-sample-app/swift-sample-app.entitlements";
510510
CODE_SIGN_STYLE = Automatic;
511-
DEVELOPMENT_TEAM = BP98Z28R86;
511+
DEVELOPMENT_TEAM = "";
512512
INFOPLIST_FILE = "swift-sample-app/Info.plist";
513513
LD_RUNPATH_SEARCH_PATHS = (
514514
"$(inherited)",
515515
"@executable_path/Frameworks",
516516
);
517-
PRODUCT_BUNDLE_IDENTIFIER = "iterable.swift-sample-app";
517+
PRODUCT_BUNDLE_IDENTIFIER = "com.example.iterable.swift-sample-app";
518518
PRODUCT_NAME = "$(TARGET_NAME)";
519519
SWIFT_VERSION = 5.0;
520520
TARGETED_DEVICE_FAMILY = "1,2";
@@ -525,14 +525,14 @@
525525
isa = XCBuildConfiguration;
526526
buildSettings = {
527527
CODE_SIGN_STYLE = Automatic;
528-
DEVELOPMENT_TEAM = BP98Z28R86;
528+
DEVELOPMENT_TEAM = "";
529529
INFOPLIST_FILE = "swift-sample-app-notification-extension/Info.plist";
530530
LD_RUNPATH_SEARCH_PATHS = (
531531
"$(inherited)",
532532
"@executable_path/Frameworks",
533533
"@executable_path/../../Frameworks",
534534
);
535-
PRODUCT_BUNDLE_IDENTIFIER = "iterable.swift-sample-app.swift-sample-app-notification-extension";
535+
PRODUCT_BUNDLE_IDENTIFIER = "com.example.iterable.swift-sample-app.swift-sample-app-notification-extension";
536536
PRODUCT_NAME = "$(TARGET_NAME)";
537537
SKIP_INSTALL = YES;
538538
SWIFT_VERSION = 5.0;
@@ -544,14 +544,14 @@
544544
isa = XCBuildConfiguration;
545545
buildSettings = {
546546
CODE_SIGN_STYLE = Automatic;
547-
DEVELOPMENT_TEAM = BP98Z28R86;
547+
DEVELOPMENT_TEAM = "";
548548
INFOPLIST_FILE = "swift-sample-app-notification-extension/Info.plist";
549549
LD_RUNPATH_SEARCH_PATHS = (
550550
"$(inherited)",
551551
"@executable_path/Frameworks",
552552
"@executable_path/../../Frameworks",
553553
);
554-
PRODUCT_BUNDLE_IDENTIFIER = "iterable.swift-sample-app.swift-sample-app-notification-extension";
554+
PRODUCT_BUNDLE_IDENTIFIER = "com.example.iterable.swift-sample-app.swift-sample-app-notification-extension";
555555
PRODUCT_NAME = "$(TARGET_NAME)";
556556
SKIP_INSTALL = YES;
557557
SWIFT_VERSION = 5.0;

sample-apps/swift-sample-app/swift-sample-app/AppDelegate.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ extension AppDelegate: IterableCustomActionDelegate {
165165
func handle(iterableCustomAction action: IterableAction, inContext _: IterableActionContext) -> Bool {
166166
if action.type == "handleFindCoffee" {
167167
if let query = action.userInput {
168-
return DeepLinkHandler.handle(url: URL(string: "https://majumder.me/coffee?q=\(query)")!)
168+
return DeepLinkHandler.handle(url: URL(string: "https://example.com/coffee?q=\(query)")!)
169169
}
170170
}
171171
return false

sample-apps/swift-sample-app/swift-sample-app/swift-sample-app.entitlements

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
<string>development</string>
77
<key>com.apple.developer.associated-domains</key>
88
<array>
9-
<string>applinks:majumder.me</string>
10-
<string>applinks:links.majumder.me</string>
9+
<string>applinks:example.com</string>
10+
<string>applinks:links.example.com</string>
1111
</array>
1212
</dict>
1313
</plist>

swift-sdk.xcodeproj/project.pbxproj

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -401,8 +401,11 @@
401401
ACFF42B02465B4AE00FDF10D /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = ACFF42AF2465B4AE00FDF10D /* AppDelegate.swift */; };
402402
BA2BB8192BADD5A500EA0229 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = BA2BB8182BADD5A500EA0229 /* PrivacyInfo.xcprivacy */; };
403403
BA2BB81A2BADD5A500EA0229 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = BA2BB8182BADD5A500EA0229 /* PrivacyInfo.xcprivacy */; };
404+
E9003E012BF4DF15004AB45B /* RetryPolicy.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9003E002BF4DF15004AB45B /* RetryPolicy.swift */; };
404405
E9BF47962B46D5DC0033DB69 /* IterableEmbeddedView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9BF47952B46D5DC0033DB69 /* IterableEmbeddedView.swift */; };
405406
E9BF47982B46DEB30033DB69 /* IterableEmbeddedView.xib in Resources */ = {isa = PBXBuildFile; fileRef = E9BF47972B46DEB30033DB69 /* IterableEmbeddedView.xib */; };
407+
E9FF7FD12BFCBD90000409ED /* AuthFailure.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9FF7FD02BFCBD90000409ED /* AuthFailure.swift */; };
408+
E9FF7FD32BFCBDB9000409ED /* AuthFailureReason.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9FF7FD22BFCBDB9000409ED /* AuthFailureReason.swift */; };
406409
/* End PBXBuildFile section */
407410

408411
/* Begin PBXContainerItemProxy section */
@@ -805,8 +808,11 @@
805808
ACFF42AE24656ECF00FDF10D /* ui-tests-app.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = "ui-tests-app.entitlements"; sourceTree = "<group>"; };
806809
ACFF42AF2465B4AE00FDF10D /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
807810
BA2BB8182BADD5A500EA0229 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
811+
E9003E002BF4DF15004AB45B /* RetryPolicy.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RetryPolicy.swift; sourceTree = "<group>"; };
808812
E9BF47952B46D5DC0033DB69 /* IterableEmbeddedView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = IterableEmbeddedView.swift; sourceTree = "<group>"; };
809813
E9BF47972B46DEB30033DB69 /* IterableEmbeddedView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = IterableEmbeddedView.xib; sourceTree = "<group>"; };
814+
E9FF7FD02BFCBD90000409ED /* AuthFailure.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AuthFailure.swift; sourceTree = "<group>"; };
815+
E9FF7FD22BFCBDB9000409ED /* AuthFailureReason.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AuthFailureReason.swift; sourceTree = "<group>"; };
810816
/* End PBXFileReference section */
811817

812818
/* Begin PBXFrameworksBuildPhase section */
@@ -1063,6 +1069,9 @@
10631069
AC3C10F8213F46A900A9B839 /* IterableLogging.swift */,
10641070
ACA8D1A221910C66001B1332 /* IterableMessaging.swift */,
10651071
AC78F0E6253D7F09006378A5 /* IterablePushNotificationMetadata.swift */,
1072+
E9FF7FD02BFCBD90000409ED /* AuthFailure.swift */,
1073+
E9FF7FD22BFCBDB9000409ED /* AuthFailureReason.swift */,
1074+
E9003E002BF4DF15004AB45B /* RetryPolicy.swift */,
10661075
);
10671076
path = "swift-sdk";
10681077
sourceTree = "<group>";
@@ -2089,6 +2098,7 @@
20892098
AC72A0D220CF4D12004D7997 /* IterableUtil.swift in Sources */,
20902099
AC32E16821DD55B900BD4F83 /* OrderedDictionary.swift in Sources */,
20912100
ACF406232507BC72005FD775 /* NetworkMonitor.swift in Sources */,
2101+
E9003E012BF4DF15004AB45B /* RetryPolicy.swift in Sources */,
20922102
AC1712892416AEF400F2BB0E /* WebViewProtocol.swift in Sources */,
20932103
AC3C10F9213F46A900A9B839 /* IterableLogging.swift in Sources */,
20942104
55DD207F26A0D83800773CC7 /* IterableAuthManagerProtocol.swift in Sources */,
@@ -2117,6 +2127,7 @@
21172127
551FA7582988A8FC0072D0A9 /* IterableEmbeddedManagerProtocol.swift in Sources */,
21182128
AC776DA6211A1B8A00C27C27 /* IterableRequestUtil.swift in Sources */,
21192129
55DD2053269FA28200773CC7 /* IterableInAppManagerProtocol.swift in Sources */,
2130+
E9FF7FD32BFCBDB9000409ED /* AuthFailureReason.swift in Sources */,
21202131
ACEDF41D2183C2EC000B9BFE /* Pending.swift in Sources */,
21212132
552A0AA7280E1FDA00A80963 /* DeepLinkManager.swift in Sources */,
21222133
E9BF47962B46D5DC0033DB69 /* IterableEmbeddedView.swift in Sources */,
@@ -2149,6 +2160,7 @@
21492160
AC347B5C20E5A7E1003449CF /* APNSTypeChecker.swift in Sources */,
21502161
ACD2B84F25B15CFA005D7A90 /* RequestSender.swift in Sources */,
21512162
AC3A336D24F65579008225BA /* RequestProcessorUtil.swift in Sources */,
2163+
E9FF7FD12BFCBD90000409ED /* AuthFailure.swift in Sources */,
21522164
55DD2041269FA24400773CC7 /* IterableInAppMessage.swift in Sources */,
21532165
AC8E7CA524C7555E0039605F /* CoreDataUtil.swift in Sources */,
21542166
AC1AA1C624EBB2DC00F29C6B /* IterableTaskRunner.swift in Sources */,

swift-sdk/AuthFailure.swift

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
//
2+
// AuthFailure.swift
3+
// swift-sdk
4+
//
5+
// Created by HARDIK MASHRU on 21/05/24.
6+
// Copyright © 2024 Iterable. All rights reserved.
7+
//
8+
9+
import Foundation
10+
@objc public class AuthFailure: NSObject {
11+
12+
/// userId or email of the signed-in user
13+
public let userKey: String?
14+
15+
/// the authToken which caused the failure
16+
public let failedAuthToken: String?
17+
18+
/// the timestamp of the failed request
19+
public let failedRequestTime: Int
20+
21+
/// indicates a reason for failure
22+
public let failureReason: AuthFailureReason
23+
24+
public init(userKey: String?,
25+
failedAuthToken: String?,
26+
failedRequestTime: Int,
27+
failureReason: AuthFailureReason) {
28+
self.userKey = userKey
29+
self.failedAuthToken = failedAuthToken
30+
self.failedRequestTime = failedRequestTime
31+
self.failureReason = failureReason
32+
}
33+
}

0 commit comments

Comments
 (0)