You can get a verified certificate from a certification authority such as StartSSL or Thawte. Then, iOS checks to see if the trusted authority is trusted. iOS comes with various trusted authors.
If the server certificate is not verified by authority, the connection is rejected.
You do not need to do anything special in code. Use only https connection.
source
share