Skip to content

Commit

Permalink
Fix Typo in Documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
vsanthanam committed Jun 12, 2022
1 parent dca94e0 commit 1bec4fc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
/// Use this function to observe network path updates using [Combine](https://developer.apple.com/documentation/combine)
///
/// ```swift
/// let cancellable = NetworkMonitor.networkPathPublisher(requiringInterfaceType: [.wifi])
/// let cancellable = NetworkMonitor.networkPathPublisher(requiringInterfaceType: .wifi)
/// .map { path in
/// path.status == .satisfied
/// }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ NetworkReachability consists of two main classes, ``NetworkMonitor`` and ``Reach

These APIs are very similar, and can generally be used interchangeably. Like Apple's APIs, ``ReachabilityMonitor`` offers a synchronous & asynchronous APIs, and is capable of throwing errors. ``NetworkMonitor`` monitor is simpler and more powerful, but does not offer a reliable synchronous API.

| API | Single Value | Observing Values | Throws Errors | Minimum OS |
| ------------------ | ------------ | ----------------- | ------------- | --------------------------------------- |
| ``NetworkMonitor`` | Async | Async | No | iOS 12, macOS 10.14, watchOS 5, tvOS 12 |
| ``Reachability`` | Sync | Async | Yes | iOS 11, macOS 10.13, watchOS 4, tvOS 11 |
| API | Single Value | Observing Values | Throws Errors | Minimum OS |
| ------------------------- | ------------ | ----------------- | ------------- | --------------------------------------- |
| ``NetworkMonitor`` | Async | Async | No | iOS 12, macOS 10.14, watchOS 5, tvOS 12 |
| ``ReachabilityMonitor`` | Sync | Async | Yes | iOS 11, macOS 10.13, watchOS 4, tvOS 11 |

I recommend that you use ``NetworkMonitor`` as it both simpler and more robust, unless you need to target iOS 11 or you absolutely need a synchronous API.

Expand Down

0 comments on commit 1bec4fc

Please sign in to comment.