How to install the mitmproxy certificate authority in the IOS simulator:
./iosCertTrustManager.py -a ~/.mitmproxy/mitmproxy-ca-cert.pem
Note that although the IOS simulator has its own certificate store, it shares the proxy settings of the host operating system. You will therefore to have configure your OSX host's proxy settings to use the mitmproxy instance you want to test with.