iosswiftalamofiremoyapublic-key-pinning

How to implement SSL Pinning - Public Key Pinning (Not Certificate Pinning) with Moya in Swift?


I went through may blogs on internet but finding issue when implementing it. Blogs like https://betterprogramming.pub/ssl-pinning-with-moya-in-swift-d5a5edae22c2 (using certificate pinning)

Is there anyone who did Public Key Pinning with Moya and can share me the way how I can achieve this.

Thanks in anticipation!😊


Solution

  • After a lot of digging, I found the solution. Implemented using TrustKit. Please refer this link --> https://github.com/datatheorem/TrustKit. For iOS 12+.