File tree Expand file tree Collapse file tree 3 files changed +18
-29
lines changed
Utility/App Configuration
ViewRelated/Jetpack/Branding/Coordinator Expand file tree Collapse file tree 3 files changed +18
-29
lines changed Original file line number Diff line number Diff line change @@ -27,20 +27,6 @@ import WordPressAuthenticator
2727 #endif
2828 #endif
2929 #endif
30-
31- /// Deep Link URL Scheme
32- ///
33- /// Note: This needs to be manually in sync with Target > Build Settings > User-defined > `WPCOM_SCHEME`.
34- ///
35- #if DEBUG
36- static let deepLinkScheme = " wpdebug "
37- #elseif INTERNAL_BUILD
38- static let deepLinkScheme = " wpinternal "
39- #elseif ALPHA_BUILD
40- static let deepLinkScheme = " wpalpha "
41- #else
42- static let deepLinkScheme = " wordpress "
43- #endif
4430}
4531
4632// MARK: - Tab bar order
Original file line number Diff line number Diff line change @@ -3,10 +3,27 @@ import UIKit
33/// A class containing convenience methods for the the Jetpack branding experience
44class JetpackBrandingCoordinator {
55
6+ /// Used to "guess" if the Jetpack app is already installed.
7+ /// The check is done from the WordPress side.
8+ ///
9+ /// Note: The string values should kept in-sync with Jetpack's URL scheme.
10+ ///
11+ static var jetpackDeepLinkScheme : String {
12+ #if DEBUG
13+ return " jpdebug "
14+ #elseif INTERNAL_BUILD
15+ return " jpinternal "
16+ #elseif ALPHA_BUILD
17+ return " jpalpha "
18+ #else
19+ return " jetpack "
20+ #endif
21+ }
22+
623 static func presentOverlay( from viewController: UIViewController , redirectAction: ( ( ) -> Void ) ? = nil ) {
724
825 let action = redirectAction ?? {
9- guard let jetpackDeepLinkURL = URL ( string: " \( AppConstants . deepLinkScheme ) ://app " ) ,
26+ guard let jetpackDeepLinkURL = URL ( string: " \( jetpackDeepLinkScheme ) ://app " ) ,
1027 let jetpackUniversalLinkURL = URL ( string: " https://jetpack.com/app " ) ,
1128 let jetpackAppStoreURL = URL ( string: " https://apps.apple.com/app/jetpack-website-builder/id1565481562 " ) else {
1229 return
Original file line number Diff line number Diff line change @@ -27,20 +27,6 @@ import WordPressKit
2727 #endif
2828 #endif
2929 #endif
30-
31- /// Deep Link URL Scheme
32- ///
33- /// Note: this needs to be in sync with Target > Build Settings > User-defined > `WPCOM_SCHEME` value.
34- ///
35- #if DEBUG
36- static let deepLinkScheme = " jpdebug "
37- #elseif INTERNAL_BUILD
38- static let deepLinkScheme = " jpinternal "
39- #elseif ALPHA_BUILD
40- static let deepLinkScheme = " jpalpha "
41- #else
42- static let deepLinkScheme = " jetpack "
43- #endif
4430}
4531
4632// MARK: - Tab bar order
You can’t perform that action at this time.
0 commit comments