Просмотр исходного кода

Fix some outdated documentation, add reminder for reachability usage.

Jon Shier 9 лет назад
Родитель
Сommit
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
 ```swift
 let serverTrustPolicy = ServerTrustPolicy.pinCertificates(
 let serverTrustPolicy = ServerTrustPolicy.pinCertificates(
-    certificates: ServerTrustPolicy.certificatesInBundle(),
+    certificates: ServerTrustPolicy.certificates(),
     validateCertificateChain: true,
     validateCertificateChain: true,
     validateHost: true
     validateHost: true
 )
 )
@@ -1599,7 +1599,7 @@ The `ServerTrustPolicyManager` is responsible for storing an internal mapping of
 ```swift
 ```swift
 let serverTrustPolicies: [String: ServerTrustPolicy] = [
 let serverTrustPolicies: [String: ServerTrustPolicy] = [
     "test.example.com": .pinCertificates(
     "test.example.com": .pinCertificates(
-        certificates: ServerTrustPolicy.certificatesInBundle(),
+        certificates: ServerTrustPolicy.certificates(),
         validateCertificateChain: true,
         validateCertificateChain: true,
         validateHost: 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.
 > 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.
 There are some important things to remember when using network reachability to determine what to do next.