From 6d6813ef63f28f40b2cc16c050c49160933441af Mon Sep 17 00:00:00 2001 From: nuomi1 Date: Wed, 27 Jan 2021 22:29:04 +0800 Subject: [PATCH 1/2] feat: openURL --- NBus/Classes/Handler/WeiboHandler.swift | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/NBus/Classes/Handler/WeiboHandler.swift b/NBus/Classes/Handler/WeiboHandler.swift index 13639a6..4937484 100644 --- a/NBus/Classes/Handler/WeiboHandler.swift +++ b/NBus/Classes/Handler/WeiboHandler.swift @@ -313,6 +313,25 @@ extension WeiboHandler { } } +extension WeiboHandler: OpenURLHandlerType { + + public func openURL(_ url: URL) { + guard + let components = URLComponents(url: url, resolvingAgainstBaseURL: false) + else { + assertionFailure() + return + } + + switch components.host { + case "response" where components.path == "": + handleGeneral() + default: + assertionFailure() + } + } +} + extension WeiboHandler: OpenUserActivityHandlerType { public func openUserActivity(_ userActivity: NSUserActivity) { From 777414504b7b79daceba5ac9829f6a79b258d681 Mon Sep 17 00:00:00 2001 From: nuomi1 Date: Wed, 27 Jan 2021 22:42:58 +0800 Subject: [PATCH 2/2] bump to 0.9.1 --- NBus.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NBus.podspec b/NBus.podspec index 7a83cef..5357284 100644 --- a/NBus.podspec +++ b/NBus.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "NBus" - s.version = "0.9.0" + s.version = "0.9.1" s.summary = "A short description of NBus." s.homepage = "https://github.com/nuomi1/NBus"