title: Alamofire, Use of undeclared types
body: <p>I'm using Alamofire to SSL Pinning.
  For this, I use the below code:</p>
  
  <pre class="lang-swift prettyprint-override"><code>import Foundation
  import Alamofire
  import SwiftyJSON   
  
  class CertificateManager {
      init() {
          let serverTrustPolicies: [String: ServerTrustPolicy] = [
              "test.example.com": .pinCertificates(
                  certificates: ServerTrustPolicy.certificates(),
                  validateCertificateChain: true,
                  validateHost: true
              ),
              "insecure.expired-apis.com": .disableEvaluation
          ]
  
          let sessionManager = SessionManager(
              serverTrustPolicyManager: ServerTrustPolicyManager(policies: serverTrustPolicies)
          )
      }
  }
  </code></pre>
  
  <p>but these errors occurred:</p>
  
  <p><a href="https://i.stack.imgur.com/4oGaK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4oGaK.png" alt="Use of undeclared type error"></a></p>
  
  <p>My pod file is: <code>pod 'Alamofire', '~&gt; 5.0.0-rc.2'</code>.</p>
  
  <p>I searched and tested some solutions, but can't resolve errors. How can I fix this?</p>
  
  <p>I tried this answer too. <a href="https://stackoverflow.com/a/55902588/1240052">+</a></p>