Skip to content

Commit

Permalink
feat: webview discovery implimentation
Browse files Browse the repository at this point in the history
  • Loading branch information
saeedbashir committed Jan 5, 2024
1 parent 3bca8bf commit fdc2e1e
Show file tree
Hide file tree
Showing 19 changed files with 600 additions and 17 deletions.
9 changes: 9 additions & 0 deletions Core/Core.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,8 @@
E055A53A2B18DC95008D9E5E /* Theme.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = E055A5382B18DC95008D9E5E /* Theme.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
E09179FD2B0F204E002AB695 /* ConfigTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E09179FC2B0F204D002AB695 /* ConfigTests.swift */; };
E0D586362B314CD3009B4BA7 /* LogistrationBottomView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E0D586352B314CD3009B4BA7 /* LogistrationBottomView.swift */; };
E0D5861A2B2FF74C009B4BA7 /* DiscoveryConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = E0D586192B2FF74C009B4BA7 /* DiscoveryConfig.swift */; };
E0D5861C2B2FF85B009B4BA7 /* RawStringExtactable.swift in Sources */ = {isa = PBXBuildFile; fileRef = E0D5861B2B2FF85B009B4BA7 /* RawStringExtactable.swift */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand Down Expand Up @@ -316,6 +318,8 @@
E055A5382B18DC95008D9E5E /* Theme.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = Theme.framework; sourceTree = BUILT_PRODUCTS_DIR; };
E09179FC2B0F204D002AB695 /* ConfigTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ConfigTests.swift; sourceTree = "<group>"; };
E0D586352B314CD3009B4BA7 /* LogistrationBottomView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LogistrationBottomView.swift; sourceTree = "<group>"; };
E0D586192B2FF74C009B4BA7 /* DiscoveryConfig.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DiscoveryConfig.swift; sourceTree = "<group>"; };
E0D5861B2B2FF85B009B4BA7 /* RawStringExtactable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RawStringExtactable.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -430,6 +434,7 @@
BA8B3A2E2AD546A700D25EF5 /* DebugLog.swift */,
BADB3F5A2AD6EC56004D5CFA /* ResultExtension.swift */,
02D400602B0678190029D168 /* SKStoreReviewControllerExtension.swift */,
E0D5861B2B2FF85B009B4BA7 /* RawStringExtactable.swift */,
);
path = Extensions;
sourceTree = "<group>";
Expand Down Expand Up @@ -710,6 +715,7 @@
BAFB998F2B14B377007D09F9 /* GoogleConfig.swift */,
BAFB99912B14E23D007D09F9 /* AppleSignInConfig.swift */,
A53A32342B233DEC005FE38A /* ThemeConfig.swift */,
E0D586192B2FF74C009B4BA7 /* DiscoveryConfig.swift */,
);
path = Config;
sourceTree = "<group>";
Expand Down Expand Up @@ -996,13 +1002,16 @@
BA30427F2B20B320009B64B7 /* SocialAuthError.swift in Sources */,
0284DBFE28D48C5300830893 /* CourseItem.swift in Sources */,
0248C92329C075EF00DC8402 /* CourseBlockModel.swift in Sources */,
E0D5861A2B2FF74C009B4BA7 /* DiscoveryConfig.swift in Sources */,
DBF6F2412B014ADA0098414B /* FirebaseConfig.swift in Sources */,
072787B628D37A0E002E9142 /* Validator.swift in Sources */,
0236961D28F9A2D200EEF206 /* Data_AuthResponse.swift in Sources */,
02AFCC182AEFDB24000360F0 /* ThirdPartyMailClient.swift in Sources */,
0233D5712AF13EC800BAC8BD /* SelectMailClientView.swift in Sources */,
BAFB99842B0E282E007D09F9 /* MicrosoftConfig.swift in Sources */,
02B2B594295C5C7A00914876 /* Thread.swift in Sources */,
027DB33528D8C8FE002B6862 /* Data_MyCourse.swift in Sources */,
E0D5861C2B2FF85B009B4BA7 /* RawStringExtactable.swift in Sources */,
027BD3BD2909478B00392132 /* UIView+EnclosingScrollView.swift in Sources */,
BA8FA6682AD59A5700EA029A /* SocialAuthButton.swift in Sources */,
02D400612B0678190029D168 /* SKStoreReviewControllerExtension.swift in Sources */,
Expand Down
1 change: 1 addition & 0 deletions Core/Core/Configuration/Config/Config.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ public protocol ConfigProtocol {
var features: FeaturesConfig { get }
var theme: ThemeConfig { get }
var uiComponents: UIComponentsConfig { get }
var discovery: DiscoveryConfig { get }
}

public enum TokenType: String {
Expand Down
57 changes: 57 additions & 0 deletions Core/Core/Configuration/Config/DiscoveryConfig.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
//
// DiscoveryConfig.swift
// Core
//
// Created by SaeedBashir on 12/18/23.
//

import Foundation

public enum DiscoveryConfigType: String {
case native
case webview
case none
}

private enum DiscoveryKeys: String, RawStringExtractable {
case discoveryType = "TYPE"
case webview = "WEBVIEW"
case baseURL = "BASE_URL"
case courseDetailTemplate = "COURSE_DETAIL_TEMPLATE"
case programDetailTemplate = "PROGRAM_DETAIL_TEMPLATE"
}

public class DiscoveryWebviewConfig: NSObject {
public let baseURL: String?
public let courseDetailTemplate: String?
public let programDetailTemplate: String?

init(dictionary: [String: AnyObject]) {
baseURL = dictionary[DiscoveryKeys.baseURL] as? String
courseDetailTemplate = dictionary[DiscoveryKeys.courseDetailTemplate] as? String
programDetailTemplate = dictionary[DiscoveryKeys.programDetailTemplate] as? String
}
}

public class DiscoveryConfig: NSObject {
public let type: DiscoveryConfigType
public let webview: DiscoveryWebviewConfig

init(dictionary: [String: AnyObject]) {
type = (dictionary[DiscoveryKeys.discoveryType] as? String).flatMap {
DiscoveryConfigType(rawValue: $0)
} ?? .none
webview = DiscoveryWebviewConfig(dictionary: dictionary[DiscoveryKeys.webview] as? [String: AnyObject] ?? [:])
}

var isEnabled: Bool {
return type != .none
}
}

private let key = "DISCOVERY"
extension Config {
public var discovery: DiscoveryConfig {
DiscoveryConfig(dictionary: self[key] as? [String: AnyObject] ?? [:])
}
}
27 changes: 27 additions & 0 deletions Core/Core/Extensions/RawStringExtactable.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
//
// RawStringExtactable.swift
// Core
//
// Created by SaeedBashir on 12/18/23.
//

import Foundation

public protocol RawStringExtractable {
var rawValue: String { get }
}

public protocol DictionaryExtractionExtension {
associatedtype Key
associatedtype Value
subscript(key: Key) -> Value? { get }
}

extension Dictionary: DictionaryExtractionExtension {}

public extension DictionaryExtractionExtension where Self.Key == String {

subscript(key :RawStringExtractable) -> Value? {
return self[key.rawValue]
}
}
2 changes: 2 additions & 0 deletions Core/Core/SwiftGen/Strings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,8 @@ public enum CoreLocalization {
public enum Alert {
/// Cancel
public static let cancel = CoreLocalization.tr("Localizable", "WEBVIEW.ALERT.CANCEL", fallback: "Cancel")
/// Continue
public static let `continue` = CoreLocalization.tr("Localizable", "WEBVIEW.ALERT.CONTINUE", fallback: "Continue")
/// Ok
public static let ok = CoreLocalization.tr("Localizable", "WEBVIEW.ALERT.OK", fallback: "Ok")
}
Expand Down
28 changes: 25 additions & 3 deletions Core/Core/View/Base/WebView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ import WebKit
import SwiftUI
import Theme

public protocol WebViewNavigationDelegate: AnyObject {
func webView(_ webView: WKWebView, shouldLoad request: URLRequest, navigationAction: WKNavigationAction) -> Bool
}

public struct WebView: UIViewRepresentable {

public class ViewModel: ObservableObject {
Expand All @@ -25,12 +29,20 @@ public struct WebView: UIViewRepresentable {

@ObservedObject var viewModel: ViewModel
@Binding public var isLoading: Bool
weak var webViewNavDelegate: WebViewNavigationDelegate?

var refreshCookies: () async -> Void

public init(viewModel: ViewModel, isLoading: Binding<Bool>, refreshCookies: @escaping () async -> Void) {
public init(
viewModel: ViewModel,
isLoading: Binding<Bool>,
refreshCookies: @escaping () async -> Void,
navigationDelegate: WebViewNavigationDelegate? = nil
) {
self.viewModel = viewModel
self._isLoading = isLoading
self.refreshCookies = refreshCookies
self.webViewNavDelegate = navigationDelegate
}

public class Coordinator: NSObject, WKNavigationDelegate, WKUIDelegate {
Expand Down Expand Up @@ -79,6 +91,16 @@ public struct WebView: UIViewRepresentable {

guard let url = navigationAction.request.url else { return .cancel }

let isWebViewDelegateHandled = await (
parent.webViewNavDelegate?.webView(
webView,
shouldLoad: navigationAction.request, navigationAction: navigationAction) ?? false
)

if isWebViewDelegateHandled {
return .cancel
}

let baseURL = await parent.viewModel.baseURL
if !baseURL.isEmpty, !url.absoluteString.starts(with: baseURL) {
if navigationAction.navigationType == .other {
Expand Down Expand Up @@ -139,8 +161,8 @@ public struct WebView: UIViewRepresentable {
webView.backgroundColor = .clear
webView.scrollView.backgroundColor = Theme.Colors.white.uiColor()
webView.scrollView.alwaysBounceVertical = false
webView.scrollView.layer.cornerRadius = 24
webView.scrollView.layer.maskedCorners = [.layerMinXMinYCorner, .layerMaxXMinYCorner]
// webView.scrollView.layer.cornerRadius = 24
// webView.scrollView.layer.maskedCorners = [.layerMinXMinYCorner, .layerMaxXMinYCorner]
webView.scrollView.contentInset = UIEdgeInsets(top: 0, left: 0, bottom: 200, right: 0)

return webView
Expand Down
1 change: 1 addition & 0 deletions Core/Core/en.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@

"WEBVIEW.ALERT.OK" = "Ok";
"WEBVIEW.ALERT.CANCEL" = "Cancel";
"WEBVIEW.ALERT.CONTINUE" = "Continue";

"REVIEW.VOTE_TITLE" = "Enjoying Open edX?";
"REVIEW.VOTE_DESCRIPTION" = "Your feedback matters to us. Would you take a moment to rate the app by tapping a star below? Thanks for your support!";
Expand Down
1 change: 1 addition & 0 deletions Core/Core/uk.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@

"WEBVIEW.ALERT.OK" = "Так";
"WEBVIEW.ALERT.CANCEL" = "Скасувати";
"WEBVIEW.ALERT.CONTINUE" = "Continue";


"REVIEW.VOTE_TITLE" = "Вам подобається Open edX?";
Expand Down
38 changes: 38 additions & 0 deletions Discovery/Discovery.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@
CFC849452996A52A0055E497 /* SearchViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = CFC849442996A52A0055E497 /* SearchViewModel.swift */; };
CFC8494C299A66080055E497 /* Localizable.stringsdict in Resources */ = {isa = PBXBuildFile; fileRef = CFC8494E299A66080055E497 /* Localizable.stringsdict */; };
CFC84950299BE52C0055E497 /* SearchViewModelTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = CFC8494F299BE52C0055E497 /* SearchViewModelTests.swift */; };
E0D586202B300095009B4BA7 /* DiscoverWebviewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = E0D5861E2B300095009B4BA7 /* DiscoverWebviewModel.swift */; };
E0D586212B300095009B4BA7 /* DiscoveryWebview.swift in Sources */ = {isa = PBXBuildFile; fileRef = E0D5861F2B300095009B4BA7 /* DiscoveryWebview.swift */; };
E0D586232B3000AD009B4BA7 /* DiscoveryHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = E0D586222B3000AD009B4BA7 /* DiscoveryHelper.swift */; };
E0D586252B300134009B4BA7 /* URL+PathExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = E0D586242B300134009B4BA7 /* URL+PathExtension.swift */; };
E0D586272B3004BA009B4BA7 /* DiscoveryCourseDetailWebview.swift in Sources */ = {isa = PBXBuildFile; fileRef = E0D586262B3004BA009B4BA7 /* DiscoveryCourseDetailWebview.swift */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand Down Expand Up @@ -87,6 +92,12 @@
CFC8494D299A66080055E497 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.stringsdict; name = en; path = en.lproj/Localizable.stringsdict; sourceTree = "<group>"; };
CFC8494F299BE52C0055E497 /* SearchViewModelTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SearchViewModelTests.swift; sourceTree = "<group>"; };
E0D586132B29F25A009B4BA7 /* Authorization.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = Authorization.framework; sourceTree = BUILT_PRODUCTS_DIR; };
E0D5861E2B300095009B4BA7 /* DiscoverWebviewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DiscoverWebviewModel.swift; sourceTree = "<group>"; };
E0D5861F2B300095009B4BA7 /* DiscoveryWebview.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DiscoveryWebview.swift; sourceTree = "<group>"; };
E0D586222B3000AD009B4BA7 /* DiscoveryHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DiscoveryHelper.swift; sourceTree = "<group>"; };
E0D586242B300134009B4BA7 /* URL+PathExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "URL+PathExtension.swift"; sourceTree = "<group>"; };
E0D586262B3004BA009B4BA7 /* DiscoveryCourseDetailWebview.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DiscoveryCourseDetailWebview.swift; sourceTree = "<group>"; };
E0D586282B302C3A009B4BA7 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; };
E192F9B4A7EECED9665AB8A7 /* Pods-App-Discovery.releasedev.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-App-Discovery.releasedev.xcconfig"; path = "Target Support Files/Pods-App-Discovery/Pods-App-Discovery.releasedev.xcconfig"; sourceTree = "<group>"; };
F340BD73D38B0DF9E4EA6482 /* Pods-App-Discovery-DiscoveryUnitTests.releaseprod.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-App-Discovery-DiscoveryUnitTests.releaseprod.xcconfig"; path = "Target Support Files/Pods-App-Discovery-DiscoveryUnitTests/Pods-App-Discovery-DiscoveryUnitTests.releaseprod.xcconfig"; sourceTree = "<group>"; };
FF565519B9BBC73E92249648 /* Pods-App-Discovery-DiscoveryUnitTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-App-Discovery-DiscoveryUnitTests.release.xcconfig"; path = "Target Support Files/Pods-App-Discovery-DiscoveryUnitTests/Pods-App-Discovery-DiscoveryUnitTests.release.xcconfig"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -179,6 +190,7 @@
070019A228F6EF2700D5FC78 /* Presentation */ = {
isa = PBXGroup;
children = (
E0D5861D2B300095009B4BA7 /* WebDiscovery */,
029242E52AE6976E00A940EC /* UpdateViews */,
072787B328D34D91002E9142 /* DiscoveryView.swift */,
0283347828D49A8700C828FC /* DiscoveryViewModel.swift */,
Expand Down Expand Up @@ -214,6 +226,7 @@
0727879B28D34C03002E9142 /* Discovery */ = {
isa = PBXGroup;
children = (
E0D586282B302C3A009B4BA7 /* Info.plist */,
02EF39CB28D866C50058F6BD /* SwiftGen */,
0284DBF828D4831000830893 /* Data */,
0284DC0428D4996F00830893 /* Domain */,
Expand Down Expand Up @@ -268,6 +281,18 @@
path = ../Pods;
sourceTree = "<group>";
};
E0D5861D2B300095009B4BA7 /* WebDiscovery */ = {
isa = PBXGroup;
children = (
E0D5861E2B300095009B4BA7 /* DiscoverWebviewModel.swift */,
E0D5861F2B300095009B4BA7 /* DiscoveryWebview.swift */,
E0D586222B3000AD009B4BA7 /* DiscoveryHelper.swift */,
E0D586242B300134009B4BA7 /* URL+PathExtension.swift */,
E0D586262B3004BA009B4BA7 /* DiscoveryCourseDetailWebview.swift */,
);
path = WebDiscovery;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXHeadersBuildPhase section */
Expand Down Expand Up @@ -483,15 +508,20 @@
0284DBFC28D4856A00830893 /* DiscoveryEndpoint.swift in Sources */,
029737402949FB070051696B /* DiscoveryCoreModel.xcdatamodeld in Sources */,
029242E72AE6978400A940EC /* UpdateRequiredView.swift in Sources */,
E0D586232B3000AD009B4BA7 /* DiscoveryHelper.swift in Sources */,
0283347728D499BC00C828FC /* DiscoveryInteractor.swift in Sources */,
02F3BFDF29252F2F0051930C /* DiscoveryRouter.swift in Sources */,
0283347928D49A8700C828FC /* DiscoveryViewModel.swift in Sources */,
072787B428D34D91002E9142 /* DiscoveryView.swift in Sources */,
E0D586252B300134009B4BA7 /* URL+PathExtension.swift in Sources */,
029737422949FB3B0051696B /* DiscoveryPersistenceProtocol.swift in Sources */,
0284DC0328D4922900830893 /* DiscoveryRepository.swift in Sources */,
029242EB2AE6AB7B00A940EC /* UpdateNotificationView.swift in Sources */,
02EF39DC28D86BEF0058F6BD /* Strings.swift in Sources */,
E0D586202B300095009B4BA7 /* DiscoverWebviewModel.swift in Sources */,
02F1752F2A4DA3B60019CD70 /* DiscoveryAnalytics.swift in Sources */,
E0D586272B3004BA009B4BA7 /* DiscoveryCourseDetailWebview.swift in Sources */,
E0D586212B300095009B4BA7 /* DiscoveryWebview.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -731,6 +761,7 @@
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = Discovery/Info.plist;
INFOPLIST_KEY_NSHumanReadableCopyright = "";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
Expand Down Expand Up @@ -845,6 +876,7 @@
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = Discovery/Info.plist;
INFOPLIST_KEY_NSHumanReadableCopyright = "";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
Expand Down Expand Up @@ -1022,6 +1054,7 @@
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = Discovery/Info.plist;
INFOPLIST_KEY_NSHumanReadableCopyright = "";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
Expand Down Expand Up @@ -1057,6 +1090,7 @@
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = Discovery/Info.plist;
INFOPLIST_KEY_NSHumanReadableCopyright = "";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
Expand Down Expand Up @@ -1155,6 +1189,7 @@
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = Discovery/Info.plist;
INFOPLIST_KEY_NSHumanReadableCopyright = "";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
Expand Down Expand Up @@ -1254,6 +1289,7 @@
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = Discovery/Info.plist;
INFOPLIST_KEY_NSHumanReadableCopyright = "";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
Expand Down Expand Up @@ -1347,6 +1383,7 @@
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = Discovery/Info.plist;
INFOPLIST_KEY_NSHumanReadableCopyright = "";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
Expand Down Expand Up @@ -1439,6 +1476,7 @@
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = Discovery/Info.plist;
INFOPLIST_KEY_NSHumanReadableCopyright = "";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
Expand Down
3 changes: 2 additions & 1 deletion Discovery/Discovery/Presentation/DiscoveryRouter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import Foundation
import Core

public protocol DiscoveryRouter: BaseRouter {

func showCourseDetais(courseID: String, title: String)
func showWebDiscoveryDetails(pathID: String, discoveryType: DiscoveryWebviewType)
func showUpdateRequiredView(showAccountLink: Bool)
func showUpdateRecomendedView()
func showDiscoverySearch(searchQuery: String?)
Expand All @@ -23,6 +23,7 @@ public class DiscoveryRouterMock: BaseRouterMock, DiscoveryRouter {
public override init() {}

public func showCourseDetais(courseID: String, title: String) {}
public func showWebDiscoveryDetails(pathID: String, discoveryType: DiscoveryWebviewType) {}
public func showUpdateRequiredView(showAccountLink: Bool) {}
public func showUpdateRecomendedView() {}
public func showDiscoverySearch(searchQuery: String? = nil) {}
Expand Down
Loading

0 comments on commit fdc2e1e

Please sign in to comment.