Skip to content

Instantly share code, notes, and snippets.

@tssandor
Created February 15, 2022 07:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tssandor/e6d46c99517459dfc5ae6f9104f93e7e to your computer and use it in GitHub Desktop.
Save tssandor/e6d46c99517459dfc5ae6f9104f93e7e to your computer and use it in GitHub Desktop.
extension AppDelegate: PublisherDelegate {
/// this method called when failure to track location
func publisherOnError(error: Error) {
print("track location failed, error: \(error.
localizedDescription)")
}
/// this method called when location successfully tracked
func publisherOnSuccessTracking() {
print("location successfully tracked")
}
/// this controller used to show alert.
func publisherControllreParent() -> UIViewController? {
UIApplication.shared.windows.first(where: { $0.isKeyWindow })?.
rootViewController
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment