Skip to content

Remove long-unused Iterable deep links handling #24487

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Sources/Reader/Reader.entitlements
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
<array>
<string>webcredentials:wordpress.com</string>
<string>webcredentials:*.wordpress.com</string>
<string>applinks:links.wp.a8cmail.com</string>
</array>
<key>aps-environment</key>
<string>development</string>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import UIKit
import WordPressShared

/// `WPTabBarController` is used as the root presenter when Jetpack features are enabled
/// and the app's UI is normal.
Expand All @@ -22,8 +23,11 @@ extension WPTabBarController: RootViewPresenter {
}

func showNotificationsTab(completion: ((NotificationsViewController) -> Void)?) {
self.selectedIndex = WPTab.notifications.rawValue
completion?(self.notificationsViewController!)
// UITabBarController.selectedIndex must be used from main thread only.
wpAssert(Thread.isMainThread)

selectedIndex = WPTab.notifications.rawValue
completion?(notificationsViewController!)
}

// MARK: Me
Expand Down
27 changes: 12 additions & 15 deletions WordPress/Classes/System/WordPressAppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,9 @@ extension WordPressAppDelegate {
}

trackDeepLink(for: url) { url in
UniversalLinkRouter.shared.handle(url: url)
DispatchQueue.main.async {
UniversalLinkRouter.shared.handle(url: url)
}
}
}

Expand All @@ -473,24 +475,19 @@ extension WordPressAppDelegate {
extension WordPressAppDelegate {

private func trackDeepLink(for url: URL, completion: @escaping ((URL) -> Void)) {
guard isIterableDeepLink(url) else {
completion(url)
return
}

let task = URLSession.shared.dataTask(with: url) {(_, response, error) in
if let url = response?.url {
completion(url)
let task = URLSession.shared.dataTask(with: url) { _, response, error in
guard let url = response?.url else {
wpAssertionFailure(
"Received a deep link response without URL attached.",
userInfo: ["response": response ?? "no response"]
)
return
}

completion(url)
}
task.resume()
}

private func isIterableDeepLink(_ url: URL) -> Bool {
return url.absoluteString.contains(WordPressAppDelegate.iterableDomain)
}

private static let iterableDomain = "links.wp.a8cmail.com"
}

// MARK: - Helpers
Expand Down
1 change: 0 additions & 1 deletion WordPress/Jetpack/JetpackDebug.entitlements
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
<string>applinks:wordpress.com</string>
<string>applinks:*.wordpress.com</string>
<string>applinks:public-api.wordpress.com</string>
<string>applinks:links.wp.a8cmail.com</string>
</array>
<key>com.apple.security.application-groups</key>
<array>
Expand Down
1 change: 0 additions & 1 deletion WordPress/Jetpack/JetpackRelease-Alpha.entitlements
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
<string>applinks:wordpress.com</string>
<string>applinks:*.wordpress.com</string>
<string>applinks:public-api.wordpress.com</string>
<string>applinks:links.wp.a8cmail.com</string>
</array>
<key>com.apple.security.application-groups</key>
<array>
Expand Down
1 change: 0 additions & 1 deletion WordPress/Jetpack/JetpackRelease.entitlements
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
<string>applinks:wordpress.com</string>
<string>applinks:*.wordpress.com</string>
<string>applinks:public-api.wordpress.com</string>
<string>applinks:links.wp.a8cmail.com</string>
</array>
<key>com.apple.security.application-groups</key>
<array>
Expand Down
1 change: 0 additions & 1 deletion WordPress/WordPress-Alpha.entitlements
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
<array>
<string>webcredentials:wordpress.com</string>
<string>webcredentials:*.wordpress.com</string>
<string>applinks:links.wp.a8cmail.com</string>
</array>
<key>com.apple.security.application-groups</key>
<array>
Expand Down
1 change: 0 additions & 1 deletion WordPress/WordPress.entitlements
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
<array>
<string>webcredentials:wordpress.com</string>
<string>webcredentials:*.wordpress.com</string>
<string>applinks:links.wp.a8cmail.com</string>
</array>
<key>com.apple.developer.icloud-container-identifiers</key>
<array>
Expand Down