Xamarin.iOSでHttpClinetを使った時に、System.Net.WebExceptionが発生するようになってしまった。前はhttpでもいけたと思ったんだけど、httpsじゃないとダメみたい。

stack overflowにXcode用の解決方法があった
[The resource could not be loaded because the App Transport Security policy requires the use of a secure connection]
(https://stackoverflow.com/questions/32631184/the-resource-could-not-be-loaded-because-the-app-transport-security-policy-requi)
Xamarinで試したところうまくいった
- Visual Studio>プロジェクトツリー>info.plist>ソースを開く
- 新しいエントリの追加で、NSAppTransportSecurity(辞書型)を追加
- 追加されたエントリの下に、NSAllowsArbitraryLoads(ブール値)を追加し、値を「Yes」にする。
リビルドして実行すれば、httpsで通信できるようになる。
