2
0
Эх сурвалжийг харах

Fix some outdated documentation, add reminder for reachability usage.

Jon Shier 9 жил өмнө
parent
commit
4b1181d38b
1 өөрчлөгдсөн 3 нэмэгдсэн , 2 устгасан
  1. 3 2
      README.md

+ 3 - 2
README.md

@@ -1578,7 +1578,7 @@ The `ServerTrustPolicy` enumeration evaluates the server trust generally provide
 
 ```swift
 let serverTrustPolicy = ServerTrustPolicy.pinCertificates(
-    certificates: ServerTrustPolicy.certificatesInBundle(),
+    certificates: ServerTrustPolicy.certificates(),
     validateCertificateChain: true,
     validateHost: true
 )
@@ -1599,7 +1599,7 @@ The `ServerTrustPolicyManager` is responsible for storing an internal mapping of
 ```swift
 let serverTrustPolicies: [String: ServerTrustPolicy] = [
     "test.example.com": .pinCertificates(
-        certificates: ServerTrustPolicy.certificatesInBundle(),
+        certificates: ServerTrustPolicy.certificates(),
         validateCertificateChain: true,
         validateHost: true
     ),
@@ -1700,6 +1700,7 @@ manager?.startListening()
 ```
 
 > Make sure to remember to retain the `manager` in the above example, or no status changes will be reported.
+> Also, do not include the scheme in the `host` string or reachability won't function correctly.
 
 There are some important things to remember when using network reachability to determine what to do next.