How to enable iOS Simulator to connect to CosmosDB Emulator










0














I am developing an app and I would like to enable my iOS Simulator and dev device to connect to the CosmosDB Emulator running on my windows laptop.



I can set the proper endpoint url, pointing to the emulator, but the Trust for the SSL fails as I am accessing it via IP, and the Azure CosmosDB Certificate has a fixed set of Subject Alternative Names:



- DNS Name = localhost
- DNS Name = <my windows hostname>
- IP Address = 127.0.0.1
- IP Address = 172.18.222.81
- DNS Name = 127.0.0.1
- DNS Name = 172.18.222.81


Now, for the simulator I suppose I can solve it with my hosts file and just map to my Windows IP. Or use Charles Proxy and it's DNS Spoofing, but this fails to work on my development device. The hosts file I cannot change, and Charles Proxy will proxy web requests from Safari using the DNS spoofing from the app, but the DocumentClient from Microsoft.Azure.Documents.Client appears not to use the proxy at all.



I get a name resolution error when I try from the device when using https://<my windows hostname>:8081 as the endpoint url.




System.Net.Http.HttpRequestException: An error occurred while sending the request ---> System.Net.WebException: Error: NameResolutionFailure




I can however setup my own HttpClient and enable the Proxy from a provided HttpClientHandler and I can indeed, without a name resolution error, pull down the html from the emulator at: https://<my windows hostname>:8081/_explorer/index.html



Both of these will successfully use the proxy and fetch the html:



var settings = CoreFoundation.CFNetwork.GetSystemProxySettings();
var address = $"settings.HTTPProxy:settings.HTTPPort";
HttpClientHandler proxyHandler = new HttpClientHandler()

Proxy = new WebProxy(Address: address, BypassOnLocal: false)
UseProxy = true,


httpClient = new HttpClient(proxyHandler);


And this one



HttpClientHandler proxyHandler = new HttpClientHandler()

Proxy = CoreFoundation.CFNetwork.GetDefaultProxy(),
UseProxy = true,


httpClient = new HttpClient(proxyHandler);


So I know it can work, it just seems like DocumentClient from Microsoft.Azure.Documents.Client won't use any proxy and I could not find a way to configure it to use one unless I missed something.










share|improve this question




























    0














    I am developing an app and I would like to enable my iOS Simulator and dev device to connect to the CosmosDB Emulator running on my windows laptop.



    I can set the proper endpoint url, pointing to the emulator, but the Trust for the SSL fails as I am accessing it via IP, and the Azure CosmosDB Certificate has a fixed set of Subject Alternative Names:



    - DNS Name = localhost
    - DNS Name = <my windows hostname>
    - IP Address = 127.0.0.1
    - IP Address = 172.18.222.81
    - DNS Name = 127.0.0.1
    - DNS Name = 172.18.222.81


    Now, for the simulator I suppose I can solve it with my hosts file and just map to my Windows IP. Or use Charles Proxy and it's DNS Spoofing, but this fails to work on my development device. The hosts file I cannot change, and Charles Proxy will proxy web requests from Safari using the DNS spoofing from the app, but the DocumentClient from Microsoft.Azure.Documents.Client appears not to use the proxy at all.



    I get a name resolution error when I try from the device when using https://<my windows hostname>:8081 as the endpoint url.




    System.Net.Http.HttpRequestException: An error occurred while sending the request ---> System.Net.WebException: Error: NameResolutionFailure




    I can however setup my own HttpClient and enable the Proxy from a provided HttpClientHandler and I can indeed, without a name resolution error, pull down the html from the emulator at: https://<my windows hostname>:8081/_explorer/index.html



    Both of these will successfully use the proxy and fetch the html:



    var settings = CoreFoundation.CFNetwork.GetSystemProxySettings();
    var address = $"settings.HTTPProxy:settings.HTTPPort";
    HttpClientHandler proxyHandler = new HttpClientHandler()

    Proxy = new WebProxy(Address: address, BypassOnLocal: false)
    UseProxy = true,


    httpClient = new HttpClient(proxyHandler);


    And this one



    HttpClientHandler proxyHandler = new HttpClientHandler()

    Proxy = CoreFoundation.CFNetwork.GetDefaultProxy(),
    UseProxy = true,


    httpClient = new HttpClient(proxyHandler);


    So I know it can work, it just seems like DocumentClient from Microsoft.Azure.Documents.Client won't use any proxy and I could not find a way to configure it to use one unless I missed something.










    share|improve this question


























      0












      0








      0







      I am developing an app and I would like to enable my iOS Simulator and dev device to connect to the CosmosDB Emulator running on my windows laptop.



      I can set the proper endpoint url, pointing to the emulator, but the Trust for the SSL fails as I am accessing it via IP, and the Azure CosmosDB Certificate has a fixed set of Subject Alternative Names:



      - DNS Name = localhost
      - DNS Name = <my windows hostname>
      - IP Address = 127.0.0.1
      - IP Address = 172.18.222.81
      - DNS Name = 127.0.0.1
      - DNS Name = 172.18.222.81


      Now, for the simulator I suppose I can solve it with my hosts file and just map to my Windows IP. Or use Charles Proxy and it's DNS Spoofing, but this fails to work on my development device. The hosts file I cannot change, and Charles Proxy will proxy web requests from Safari using the DNS spoofing from the app, but the DocumentClient from Microsoft.Azure.Documents.Client appears not to use the proxy at all.



      I get a name resolution error when I try from the device when using https://<my windows hostname>:8081 as the endpoint url.




      System.Net.Http.HttpRequestException: An error occurred while sending the request ---> System.Net.WebException: Error: NameResolutionFailure




      I can however setup my own HttpClient and enable the Proxy from a provided HttpClientHandler and I can indeed, without a name resolution error, pull down the html from the emulator at: https://<my windows hostname>:8081/_explorer/index.html



      Both of these will successfully use the proxy and fetch the html:



      var settings = CoreFoundation.CFNetwork.GetSystemProxySettings();
      var address = $"settings.HTTPProxy:settings.HTTPPort";
      HttpClientHandler proxyHandler = new HttpClientHandler()

      Proxy = new WebProxy(Address: address, BypassOnLocal: false)
      UseProxy = true,


      httpClient = new HttpClient(proxyHandler);


      And this one



      HttpClientHandler proxyHandler = new HttpClientHandler()

      Proxy = CoreFoundation.CFNetwork.GetDefaultProxy(),
      UseProxy = true,


      httpClient = new HttpClient(proxyHandler);


      So I know it can work, it just seems like DocumentClient from Microsoft.Azure.Documents.Client won't use any proxy and I could not find a way to configure it to use one unless I missed something.










      share|improve this question















      I am developing an app and I would like to enable my iOS Simulator and dev device to connect to the CosmosDB Emulator running on my windows laptop.



      I can set the proper endpoint url, pointing to the emulator, but the Trust for the SSL fails as I am accessing it via IP, and the Azure CosmosDB Certificate has a fixed set of Subject Alternative Names:



      - DNS Name = localhost
      - DNS Name = <my windows hostname>
      - IP Address = 127.0.0.1
      - IP Address = 172.18.222.81
      - DNS Name = 127.0.0.1
      - DNS Name = 172.18.222.81


      Now, for the simulator I suppose I can solve it with my hosts file and just map to my Windows IP. Or use Charles Proxy and it's DNS Spoofing, but this fails to work on my development device. The hosts file I cannot change, and Charles Proxy will proxy web requests from Safari using the DNS spoofing from the app, but the DocumentClient from Microsoft.Azure.Documents.Client appears not to use the proxy at all.



      I get a name resolution error when I try from the device when using https://<my windows hostname>:8081 as the endpoint url.




      System.Net.Http.HttpRequestException: An error occurred while sending the request ---> System.Net.WebException: Error: NameResolutionFailure




      I can however setup my own HttpClient and enable the Proxy from a provided HttpClientHandler and I can indeed, without a name resolution error, pull down the html from the emulator at: https://<my windows hostname>:8081/_explorer/index.html



      Both of these will successfully use the proxy and fetch the html:



      var settings = CoreFoundation.CFNetwork.GetSystemProxySettings();
      var address = $"settings.HTTPProxy:settings.HTTPPort";
      HttpClientHandler proxyHandler = new HttpClientHandler()

      Proxy = new WebProxy(Address: address, BypassOnLocal: false)
      UseProxy = true,


      httpClient = new HttpClient(proxyHandler);


      And this one



      HttpClientHandler proxyHandler = new HttpClientHandler()

      Proxy = CoreFoundation.CFNetwork.GetDefaultProxy(),
      UseProxy = true,


      httpClient = new HttpClient(proxyHandler);


      So I know it can work, it just seems like DocumentClient from Microsoft.Azure.Documents.Client won't use any proxy and I could not find a way to configure it to use one unless I missed something.







      azure-cosmosdb






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 11 at 5:54

























      asked Nov 11 at 5:39









      Adam Venturella

      1,6191433




      1,6191433






















          1 Answer
          1






          active

          oldest

          votes


















          0














          This is an interesting scenario which has not been tested or investigated if it works or not. Though you can start the emulator such as it allow access from any IP:



          CosmosDB.Emulator.exe -AllowNetworkAccess -NoFirewall -Key=C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw== 


          Second step is to export a certificate which you will have to import on your other computer (in your case the IOS Simulator). There's an article I found that might help:
          Adding a self-signed certificate to iphone Simulator?



          To export the certificate execute the following PowerShell command line:



          New-Variable HostDirectory -Scope Global -Option Constant -Value ((Get-Item $PSScriptRoot).CreateSubdirectory('bind-mount'))
          New-Variable Key -Scope Global -Option Constant -Value 'C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw=='
          $password = ConvertTo-SecureString -String $Key -Force -AsPlainText
          $cert = Get-ChildItem cert:LocalMachineMy | Where-Object $_.FriendlyName -eq "DocumentDbEmulatorCertificate"
          Export-PfxCertificate -Cert $cert -FilePath "$HostDirectoryCosmosDbEmulatorCert.pfx" -Password $password | Out-Null

          $cert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2
          $cert.Import("$HostDirectoryCosmosDbEmulatorCert.pfx", $Key, "DefaultKeySet")
          $cert | Export-Certificate -FilePath "$HostDirectoryCosmosDbEmulatorCert.cer" -Type CERT


          Assuming you can import that cert onto iOS, then your IP is just the IP of your machine running the emulator.



          If it proves impossible to import the cert, we're working on an improvement for the next .NET SDK release which will let you configure the HTTPClient we use under the hood, so you can configure things like disabling SSL verification (which you should never do for production, ever, but can be helpful for dev-only purposes).






          share|improve this answer




















          • Yup, I definitely installed the certs on my local machine to test things out, and In my case the emulator runs on windows, but my simulator runs on MacOS, so the simulator/app needs the IP address on the local network, but the cert's allowed Subject Alternative Names don't allow just any IP. (see above). Once I used Charles Proxy to allow DNS Spoofing so I could use the <hostname> of the windows box though Charles, it didn't complain. Enter the issue with the client lib not running though the proxy. I just ended up spending the 0.77/day to run Cosmos =) at the minimum.
            – Adam Venturella
            Nov 13 at 5:20











          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53246149%2fhow-to-enable-ios-simulator-to-connect-to-cosmosdb-emulator%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0














          This is an interesting scenario which has not been tested or investigated if it works or not. Though you can start the emulator such as it allow access from any IP:



          CosmosDB.Emulator.exe -AllowNetworkAccess -NoFirewall -Key=C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw== 


          Second step is to export a certificate which you will have to import on your other computer (in your case the IOS Simulator). There's an article I found that might help:
          Adding a self-signed certificate to iphone Simulator?



          To export the certificate execute the following PowerShell command line:



          New-Variable HostDirectory -Scope Global -Option Constant -Value ((Get-Item $PSScriptRoot).CreateSubdirectory('bind-mount'))
          New-Variable Key -Scope Global -Option Constant -Value 'C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw=='
          $password = ConvertTo-SecureString -String $Key -Force -AsPlainText
          $cert = Get-ChildItem cert:LocalMachineMy | Where-Object $_.FriendlyName -eq "DocumentDbEmulatorCertificate"
          Export-PfxCertificate -Cert $cert -FilePath "$HostDirectoryCosmosDbEmulatorCert.pfx" -Password $password | Out-Null

          $cert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2
          $cert.Import("$HostDirectoryCosmosDbEmulatorCert.pfx", $Key, "DefaultKeySet")
          $cert | Export-Certificate -FilePath "$HostDirectoryCosmosDbEmulatorCert.cer" -Type CERT


          Assuming you can import that cert onto iOS, then your IP is just the IP of your machine running the emulator.



          If it proves impossible to import the cert, we're working on an improvement for the next .NET SDK release which will let you configure the HTTPClient we use under the hood, so you can configure things like disabling SSL verification (which you should never do for production, ever, but can be helpful for dev-only purposes).






          share|improve this answer




















          • Yup, I definitely installed the certs on my local machine to test things out, and In my case the emulator runs on windows, but my simulator runs on MacOS, so the simulator/app needs the IP address on the local network, but the cert's allowed Subject Alternative Names don't allow just any IP. (see above). Once I used Charles Proxy to allow DNS Spoofing so I could use the <hostname> of the windows box though Charles, it didn't complain. Enter the issue with the client lib not running though the proxy. I just ended up spending the 0.77/day to run Cosmos =) at the minimum.
            – Adam Venturella
            Nov 13 at 5:20
















          0














          This is an interesting scenario which has not been tested or investigated if it works or not. Though you can start the emulator such as it allow access from any IP:



          CosmosDB.Emulator.exe -AllowNetworkAccess -NoFirewall -Key=C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw== 


          Second step is to export a certificate which you will have to import on your other computer (in your case the IOS Simulator). There's an article I found that might help:
          Adding a self-signed certificate to iphone Simulator?



          To export the certificate execute the following PowerShell command line:



          New-Variable HostDirectory -Scope Global -Option Constant -Value ((Get-Item $PSScriptRoot).CreateSubdirectory('bind-mount'))
          New-Variable Key -Scope Global -Option Constant -Value 'C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw=='
          $password = ConvertTo-SecureString -String $Key -Force -AsPlainText
          $cert = Get-ChildItem cert:LocalMachineMy | Where-Object $_.FriendlyName -eq "DocumentDbEmulatorCertificate"
          Export-PfxCertificate -Cert $cert -FilePath "$HostDirectoryCosmosDbEmulatorCert.pfx" -Password $password | Out-Null

          $cert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2
          $cert.Import("$HostDirectoryCosmosDbEmulatorCert.pfx", $Key, "DefaultKeySet")
          $cert | Export-Certificate -FilePath "$HostDirectoryCosmosDbEmulatorCert.cer" -Type CERT


          Assuming you can import that cert onto iOS, then your IP is just the IP of your machine running the emulator.



          If it proves impossible to import the cert, we're working on an improvement for the next .NET SDK release which will let you configure the HTTPClient we use under the hood, so you can configure things like disabling SSL verification (which you should never do for production, ever, but can be helpful for dev-only purposes).






          share|improve this answer




















          • Yup, I definitely installed the certs on my local machine to test things out, and In my case the emulator runs on windows, but my simulator runs on MacOS, so the simulator/app needs the IP address on the local network, but the cert's allowed Subject Alternative Names don't allow just any IP. (see above). Once I used Charles Proxy to allow DNS Spoofing so I could use the <hostname> of the windows box though Charles, it didn't complain. Enter the issue with the client lib not running though the proxy. I just ended up spending the 0.77/day to run Cosmos =) at the minimum.
            – Adam Venturella
            Nov 13 at 5:20














          0












          0








          0






          This is an interesting scenario which has not been tested or investigated if it works or not. Though you can start the emulator such as it allow access from any IP:



          CosmosDB.Emulator.exe -AllowNetworkAccess -NoFirewall -Key=C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw== 


          Second step is to export a certificate which you will have to import on your other computer (in your case the IOS Simulator). There's an article I found that might help:
          Adding a self-signed certificate to iphone Simulator?



          To export the certificate execute the following PowerShell command line:



          New-Variable HostDirectory -Scope Global -Option Constant -Value ((Get-Item $PSScriptRoot).CreateSubdirectory('bind-mount'))
          New-Variable Key -Scope Global -Option Constant -Value 'C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw=='
          $password = ConvertTo-SecureString -String $Key -Force -AsPlainText
          $cert = Get-ChildItem cert:LocalMachineMy | Where-Object $_.FriendlyName -eq "DocumentDbEmulatorCertificate"
          Export-PfxCertificate -Cert $cert -FilePath "$HostDirectoryCosmosDbEmulatorCert.pfx" -Password $password | Out-Null

          $cert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2
          $cert.Import("$HostDirectoryCosmosDbEmulatorCert.pfx", $Key, "DefaultKeySet")
          $cert | Export-Certificate -FilePath "$HostDirectoryCosmosDbEmulatorCert.cer" -Type CERT


          Assuming you can import that cert onto iOS, then your IP is just the IP of your machine running the emulator.



          If it proves impossible to import the cert, we're working on an improvement for the next .NET SDK release which will let you configure the HTTPClient we use under the hood, so you can configure things like disabling SSL verification (which you should never do for production, ever, but can be helpful for dev-only purposes).






          share|improve this answer












          This is an interesting scenario which has not been tested or investigated if it works or not. Though you can start the emulator such as it allow access from any IP:



          CosmosDB.Emulator.exe -AllowNetworkAccess -NoFirewall -Key=C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw== 


          Second step is to export a certificate which you will have to import on your other computer (in your case the IOS Simulator). There's an article I found that might help:
          Adding a self-signed certificate to iphone Simulator?



          To export the certificate execute the following PowerShell command line:



          New-Variable HostDirectory -Scope Global -Option Constant -Value ((Get-Item $PSScriptRoot).CreateSubdirectory('bind-mount'))
          New-Variable Key -Scope Global -Option Constant -Value 'C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw=='
          $password = ConvertTo-SecureString -String $Key -Force -AsPlainText
          $cert = Get-ChildItem cert:LocalMachineMy | Where-Object $_.FriendlyName -eq "DocumentDbEmulatorCertificate"
          Export-PfxCertificate -Cert $cert -FilePath "$HostDirectoryCosmosDbEmulatorCert.pfx" -Password $password | Out-Null

          $cert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2
          $cert.Import("$HostDirectoryCosmosDbEmulatorCert.pfx", $Key, "DefaultKeySet")
          $cert | Export-Certificate -FilePath "$HostDirectoryCosmosDbEmulatorCert.cer" -Type CERT


          Assuming you can import that cert onto iOS, then your IP is just the IP of your machine running the emulator.



          If it proves impossible to import the cert, we're working on an improvement for the next .NET SDK release which will let you configure the HTTPClient we use under the hood, so you can configure things like disabling SSL verification (which you should never do for production, ever, but can be helpful for dev-only purposes).







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 12 at 22:51









          Chris Anderson-MSFT

          5,12511328




          5,12511328











          • Yup, I definitely installed the certs on my local machine to test things out, and In my case the emulator runs on windows, but my simulator runs on MacOS, so the simulator/app needs the IP address on the local network, but the cert's allowed Subject Alternative Names don't allow just any IP. (see above). Once I used Charles Proxy to allow DNS Spoofing so I could use the <hostname> of the windows box though Charles, it didn't complain. Enter the issue with the client lib not running though the proxy. I just ended up spending the 0.77/day to run Cosmos =) at the minimum.
            – Adam Venturella
            Nov 13 at 5:20

















          • Yup, I definitely installed the certs on my local machine to test things out, and In my case the emulator runs on windows, but my simulator runs on MacOS, so the simulator/app needs the IP address on the local network, but the cert's allowed Subject Alternative Names don't allow just any IP. (see above). Once I used Charles Proxy to allow DNS Spoofing so I could use the <hostname> of the windows box though Charles, it didn't complain. Enter the issue with the client lib not running though the proxy. I just ended up spending the 0.77/day to run Cosmos =) at the minimum.
            – Adam Venturella
            Nov 13 at 5:20
















          Yup, I definitely installed the certs on my local machine to test things out, and In my case the emulator runs on windows, but my simulator runs on MacOS, so the simulator/app needs the IP address on the local network, but the cert's allowed Subject Alternative Names don't allow just any IP. (see above). Once I used Charles Proxy to allow DNS Spoofing so I could use the <hostname> of the windows box though Charles, it didn't complain. Enter the issue with the client lib not running though the proxy. I just ended up spending the 0.77/day to run Cosmos =) at the minimum.
          – Adam Venturella
          Nov 13 at 5:20





          Yup, I definitely installed the certs on my local machine to test things out, and In my case the emulator runs on windows, but my simulator runs on MacOS, so the simulator/app needs the IP address on the local network, but the cert's allowed Subject Alternative Names don't allow just any IP. (see above). Once I used Charles Proxy to allow DNS Spoofing so I could use the <hostname> of the windows box though Charles, it didn't complain. Enter the issue with the client lib not running though the proxy. I just ended up spending the 0.77/day to run Cosmos =) at the minimum.
          – Adam Venturella
          Nov 13 at 5:20


















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.





          Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


          Please pay close attention to the following guidance:


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53246149%2fhow-to-enable-ios-simulator-to-connect-to-cosmosdb-emulator%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown