I want to make sure that my iOS app will connect with a defined web server though web api
and doesn't have any access to some other domain.
I have tried to implement NSAppTransportSecurity
to define my web server domain but it is not working for me and the app can still have an access to other domains as well.
I'm using Alamofire
networking library in Swift
to make web API requests.
Please guide me whether I can achieve this or not.
Update:
ATS
is not working for me with Alamofire
library of Swift.
Example:
// This should be accessible from my app only and the app shouldn't send any request to other domains
www.mydomain.com
Update# 2
My Purpose
My aim is to restrict my app to do so because if any opensource framework I use in my app won't be able to access any other web server excepts the one I defined.
It would be great if something I can do in plist
or from app settings for the general app target.