-
Notifications
You must be signed in to change notification settings - Fork 3
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
Analytics plugins #26
Changes from 4 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// | ||
// File.swift | ||
// OEXFoundation | ||
// | ||
// Created by Anton Yarmolenka on 26/11/2024. | ||
// | ||
|
||
import Foundation | ||
import UIKit | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we need this import for protocol? |
||
|
||
@MainActor | ||
public protocol DeepLinkManagerProtocol: Sendable { | ||
func processLinkFrom(userInfo: [AnyHashable: Any]) | ||
func processDeepLink(with params: [AnyHashable: Any]?) | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// | ||
// File.swift | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please change the filename to DeepLinkManagerProtocolMock.swift |
||
// OEXFoundation | ||
// | ||
// Created by Anton Yarmolenka on 13/01/2025. | ||
// | ||
|
||
import Foundation | ||
|
||
public class DeepLinkManagerProtocolMock: DeepLinkManagerProtocol { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is it for tests or users? |
||
public var processLinkFromUserInfo: [AnyHashable: Any] = [:] | ||
public var processLinkFromCallsCount: Int = 0 | ||
|
||
public func processLinkFrom(userInfo: [AnyHashable: Any]) { | ||
processLinkFromCallsCount += 1 | ||
processLinkFromUserInfo = userInfo | ||
} | ||
|
||
public var processDeepLinkUserInfo: [AnyHashable: Any]? | ||
public var processDeepLinkCallsCount: Int = 0 | ||
|
||
public func processDeepLink(with params: [AnyHashable: Any]?) { | ||
processDeepLinkCallsCount += 1 | ||
processDeepLinkUserInfo = params | ||
} | ||
public init() {} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// | ||
// PushNotificationService.swift | ||
// OpenEdX | ||
// | ||
// Created by Anton Yarmolenka on 22/11/2024. | ||
// | ||
|
||
import Foundation | ||
|
||
public protocol PushNotificationsProvider: Sendable { | ||
func didRegisterWithDeviceToken(deviceToken: Data) | ||
} | ||
|
||
public extension PushNotificationsProvider { | ||
func didFailToRegisterForRemoteNotificationsWithError(error: Error) {} | ||
func synchronizeToken() {} | ||
func refreshToken() {} | ||
} | ||
|
||
@MainActor | ||
public protocol PushNotificationsListener: Sendable { | ||
func shouldListenNotification(userinfo: [AnyHashable: Any]) -> Bool | ||
func didReceiveRemoteNotification(userInfo: [AnyHashable: Any]) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please change the filename to DeepLinkManagerProtocol.swift