Skip to content
This repository was archived by the owner on Feb 5, 2025. It is now read-only.
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
2 changes: 1 addition & 1 deletion WordPressAuthenticator.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Pod::Spec.new do |s|
s.name = 'WordPressAuthenticator'
s.version = '2.3.0'
s.version = '2.4.0-beta.1'

s.summary = 'WordPressAuthenticator implements an easy and elegant way to authenticate your WordPress Apps.'
s.description = <<-DESC
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,15 @@ public protocol WordPressAuthenticatorDelegate: AnyObject {
///
func presentSignupEpilogue(in navigationController: UINavigationController, for credentials: AuthenticatorCredentials, service: SocialService?)

/// Presents the Support Interface from a given ViewController, with a specified SourceTag.
/// Presents the Support Interface from a given ViewController.
///
func presentSupport(from sourceViewController: UIViewController, sourceTag: WordPressSupportSourceTag)
/// - Parameters:
/// - from: ViewController from which to present the support interface from
/// - sourceTag: Support source tag of the view controller.
/// - lastStep: Last `Step` tracked in `AuthenticatorAnalyticsTracker`
/// - lastFlow: Last `Flow` tracked in `AuthenticatorAnalyticsTracker`
///
func presentSupport(from sourceViewController: UIViewController, sourceTag: WordPressSupportSourceTag, lastStep: AuthenticatorAnalyticsTracker.Step, lastFlow: AuthenticatorAnalyticsTracker.Flow)

/// Indicates if the Login Epilogue should be displayed.
///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@ extension FancyAlertViewController {
return
}

authDelegate.presentSupport(from: sourceViewController, sourceTag: sourceTag)
let state = AuthenticatorAnalyticsTracker.shared.state
authDelegate.presentSupport(from: sourceViewController, sourceTag: sourceTag, lastStep: state.lastStep, lastFlow: state.lastFlow)
}
}

Expand Down
3 changes: 2 additions & 1 deletion WordPressAuthenticator/NUX/NUXViewControllerBase.swift
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,7 @@ extension NUXViewControllerBase where Self: UIViewController, Self: UIViewContro
fatalError()
}

WordPressAuthenticator.shared.delegate?.presentSupport(from: navigationController, sourceTag: source)
let state = AuthenticatorAnalyticsTracker.shared.state
WordPressAuthenticator.shared.delegate?.presentSupport(from: navigationController, sourceTag: source, lastStep: state.lastStep, lastFlow: state.lastFlow)
}
}