diff --git a/Sources/Hover/Hover.swift b/Sources/Hover/Hover.swift index 26f8ec9..70fe25b 100644 --- a/Sources/Hover/Hover.swift +++ b/Sources/Hover/Hover.swift @@ -20,7 +20,7 @@ public final class Hover { /// - target: `NetworkTarget` /// - type: Decodable Object Type /// - urlSession: `URLSession` - /// - scheduler: Threading and execution time helper if you want to run it on main thread just use Runloop.main + /// - scheduler: Threading and execution time helper if you want to run it on main thread just use `Runloop.main` or `DispatchQuee.main` @available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, macCatalyst 13.0, *) public func request<D, T>( with target: NetworkTarget, @@ -57,7 +57,7 @@ public final class Hover { /// - Parameters /// - target: `NetworkTarget` /// - urlSession: `URLSession - /// - scheduler: Threading and execution time helper if you want to run it on main thread just use Runloop.main` + /// - scheduler: Threading and execution time helper if you want to run it on main thread just use `Runloop.main` or `DispatchQuee.main` @available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, macCatalyst 13.0, *) public func request<T: Scheduler>( with target: NetworkTarget, @@ -89,7 +89,7 @@ public final class Hover { /// - target: `NetworkTarget` /// - type: Decodable Object Type /// - urlSession: `URLSession` - /// - scheduler: Threading and execution time helper if you want to run it on main thread just use Runloop.main + /// - scheduler: Threading and execution time helper if you want to run it on main thread just use `Runloop.main` or `DispatchQuee.main` /// - subscriber: `Subscriber` @available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, macCatalyst 13.0, *) func request<D, S, T>( @@ -130,7 +130,7 @@ public final class Hover { /// - Parameters /// - target: `NetworkTarget` /// - urlSession: `URLSession` - /// - scheduler: Threading and execution time helper if you want to run it on main thread just use Runloop.main + /// - scheduler: Threading and execution time helper if you want to run it on main thread just use `Runloop.main` or `DispatchQuee.main` /// - subscriber: `Subscriber` @available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, macCatalyst 13.0, *) func request<S, T>( diff --git a/Sources/HoverTests/Test Source/TestClass.swift b/Sources/HoverTests/Test Source/TestClass.swift index db0d72b..16ac2ed 100644 --- a/Sources/HoverTests/Test Source/TestClass.swift +++ b/Sources/HoverTests/Test Source/TestClass.swift @@ -97,7 +97,7 @@ extension TestClass { ) } func fetchCommentsWithSubscriber(_ id: Int = 1) { - provider.request(with: TestTarget.fetchCommentsByPostId(postId: id), class: CommentsResponse.self, scheduler: RunLoop.main, subscriber: self.subscriber) + provider.request(with: TestTarget.fetchCommentsByPostId(postId: id), class: CommentsResponse.self, scheduler: DispatchQueue.main, subscriber: self.subscriber) } }