Skip to content

Commit 19dd619

Browse files
Merge pull request #33 from Iterable/bugfix/mob-67-destination-url-2
[MOB-67] - Destination/Callback URLs are switched around.
2 parents 766a117 + 1156e79 commit 19dd619

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

swift-sdk/Internal/IterableInAppHTMLViewController.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ extension IterableInAppHTMLViewController : UIWebViewDelegate {
207207
return true
208208
}
209209

210-
guard let (destinationURL, callbackURL) = IterableInAppHTMLViewController.getDestinationAndCallbackUrl(url: url) else {
210+
guard let (callbackURL, destinationURL) = IterableInAppHTMLViewController.getCallbackAndDestinationUrl(url: url) else {
211211
return true
212212
}
213213

@@ -220,7 +220,7 @@ extension IterableInAppHTMLViewController : UIWebViewDelegate {
220220
return false
221221
}
222222

223-
private static func getDestinationAndCallbackUrl(url: URL) -> (callbackUrl: String, destinationUrl: String)? {
223+
private static func getCallbackAndDestinationUrl(url: URL) -> (callbackUrl: String, destinationUrl: String)? {
224224
if url.scheme == UrlScheme.custom.rawValue {
225225
// Since we are calling loadHTMLString with a nil baseUrl, any request url without a valid scheme get treated as a local resource.
226226
// Url looks like applewebdata://abc-def/something

0 commit comments

Comments
 (0)