<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: base map not loading with VPN connection in ArcGIS Runtime SDK for iOS Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/base-map-not-loading-with-vpn-connection/m-p/94725#M936</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Nicholas.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That helps and the problem is I need to import certificate to bundle. Then need to add the followings:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;// 1. import certificate
&lt;SPAN style="color: #000000;"&gt;[&lt;/SPAN&gt;&lt;SPAN style="color: #4f8187;"&gt;AGSCredential&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;importCertificateData&lt;SPAN style="color: #000000;"&gt;:cerData &lt;/SPAN&gt;password&lt;SPAN style="color: #000000;"&gt;:&lt;/SPAN&gt;&lt;SPAN style="color: #bb2ca2;"&gt;nil&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;overwrite&lt;SPAN style="color: #000000;"&gt;:&lt;/SPAN&gt;&lt;SPAN style="color: #bb2ca2;"&gt;NO&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;error&lt;SPAN style="color: #000000;"&gt;:&amp;amp;error];&lt;/SPAN&gt;

&lt;SPAN style="color: #000000;"&gt;// 2. trust base map url connection&lt;/SPAN&gt;
&lt;SPAN style="color: #000000;"&gt;[[&lt;SPAN style="color: #703daa;"&gt;NSURLConnection&lt;/SPAN&gt; &lt;SPAN style="color: #31595d;"&gt;ags_trustedHosts&lt;/SPAN&gt;] &lt;SPAN style="color: #3d1d81;"&gt;addObject&lt;/SPAN&gt;:[mapURL &lt;SPAN style="color: #3d1d81;"&gt;host&lt;/SPAN&gt;]];&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now everything works fine.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Dec 2021 23:37:09 GMT</pubDate>
    <dc:creator>QKunZhu</dc:creator>
    <dc:date>2021-12-10T23:37:09Z</dc:date>
    <item>
      <title>base map not loading with VPN connection</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/base-map-not-loading-with-vpn-connection/m-p/94723#M934</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I successfully opened base map link with user name and password from safari, but this sample app does not work after connect to VPN. The VPN I am using is Cisco AnyConnect. I cannot test without VPN otherwise I am not able to access the server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;iOS9.2, server url is a https.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code is simple:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;- (&lt;SPAN style="color: #bb2ca2;"&gt;void&lt;/SPAN&gt;)viewDidLoad {
AGSCredential&lt;SPAN style="color: #000000;"&gt;* cred = [[&lt;/SPAN&gt;AGSCredential&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #3d1d81;"&gt;alloc&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;] &lt;/SPAN&gt;&lt;SPAN style="color: #31595d;"&gt;initWithUser&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;:&lt;/SPAN&gt;&lt;SPAN style="color: #78492a;"&gt;MAP_UNAME&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #31595d;"&gt;password&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;:&lt;/SPAN&gt;&lt;SPAN style="color: #78492a;"&gt;MAP_PWD&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;];&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp; 
&lt;SPAN style="color: #4f8187;"&gt;_baseMapLayer&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; = [&lt;/SPAN&gt;&lt;SPAN style="color: #4f8187;"&gt;AGSTiledMapServiceLayer&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #31595d;"&gt;tiledMapServiceLayerWithURL&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;:[&lt;/SPAN&gt;&lt;SPAN style="color: #703daa;"&gt;NSURL&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #3d1d81;"&gt;URLWithString&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;:&lt;/SPAN&gt;&lt;SPAN style="color: #78492a;"&gt;BASE_MAP_URL_STRING&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;] &lt;/SPAN&gt;&lt;SPAN style="color: #31595d;"&gt;credential&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;:cred];&lt;/SPAN&gt;
&lt;SPAN style="color: #000000;"&gt;[&lt;/SPAN&gt;&lt;SPAN style="color: #bb2ca2;"&gt;self&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #4f8187;"&gt;mapView&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;insertMapLayer&lt;SPAN style="color: #000000;"&gt;:&lt;/SPAN&gt;&lt;SPAN style="color: #4f8187;"&gt;_baseMapLayer&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;withName&lt;SPAN style="color: #000000;"&gt;:&lt;/SPAN&gt;&lt;SPAN style="color: #d12f1b;"&gt;@"Base"&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;atIndex&lt;SPAN style="color: #000000;"&gt;:&lt;/SPAN&gt;&lt;SPAN style="color: #272ad8;"&gt;0&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;];&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp; 
&lt;SPAN style="color: #bb2ca2;"&gt;self&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;.&lt;/SPAN&gt;mapView&lt;SPAN style="color: #000000;"&gt;.&lt;/SPAN&gt;layerDelegate&lt;SPAN style="color: #000000;"&gt; = &lt;/SPAN&gt;&lt;SPAN style="color: #bb2ca2;"&gt;self&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;;&lt;/SPAN&gt;
}

&lt;SPAN style="color: #000000;"&gt;- (&lt;SPAN style="color: #bb2ca2;"&gt;void&lt;/SPAN&gt;)mapViewDidLoad:(&lt;SPAN style="color: #4f8187;"&gt;AGSMapView&lt;/SPAN&gt; *)mapView&lt;/SPAN&gt;
&lt;SPAN style="color: #000000;"&gt;{&lt;/SPAN&gt;
&lt;SPAN style="color: #000000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (mapView.loaded)&lt;/SPAN&gt;
&lt;SPAN style="color: #000000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NSLog(@"map loaded");&lt;/SPAN&gt;
&lt;SPAN style="color: #000000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;/SPAN&gt;
&lt;SPAN style="color: #000000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NSLog(@"map not loaded");&lt;/SPAN&gt;
&lt;SPAN style="color: #000000;"&gt;}&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;None of the log from mapViewDidLoad get called..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also have problem to debug because it's a enterprise provision file. Is there any place for me to log something to check?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Any help.. &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 23:37:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/base-map-not-loading-with-vpn-connection/m-p/94723#M934</guid>
      <dc:creator>QKunZhu</dc:creator>
      <dc:date>2021-12-10T23:37:04Z</dc:date>
    </item>
    <item>
      <title>Re: base map not loading with VPN connection</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/base-map-not-loading-with-vpn-connection/m-p/94724#M935</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try implementing the &lt;A href="https://developers.arcgis.com/ios/api-reference/protocol_a_g_s_layer_delegate-p.html" rel="nofollow noopener noreferrer" target="_blank"&gt;AGSLayerDelegate&lt;/A&gt; protocol and checking the &lt;SPAN style="font-family: 'andale mono', times;"&gt;layerDidLoad:&lt;/SPAN&gt; and &lt;SPAN style="font-family: 'andale mono', times;"&gt;layer:didFailToLoadWithError:&lt;/SPAN&gt; methods. Something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;@interface MyClass () &amp;lt;..., AGSLayerDelegate&amp;gt; // Include AGSLayerDelegate in your protocols list

- (void)viewDidLoad {&amp;nbsp; 
&amp;nbsp;&amp;nbsp; AGSCredential* cred = [[AGSCredential alloc] initWithUser:MAP_UNAME password:MAP_PWD];&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp; _baseMapLayer = [AGSTiledMapServiceLayer tiledMapServiceLayerWithURL:[NSURL URLWithString:BASE_MAP_URL_STRING] credential:cred];&amp;nbsp; 
&amp;nbsp;&amp;nbsp; _baseMapLayer.delegate = self;

&amp;nbsp;&amp;nbsp; [self.mapView insertMapLayer:_baseMapLayer withName:@"Base" atIndex:0];&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp; self.mapView.layerDelegate = self;&amp;nbsp; 
}

- (void)layerDidLoad:(AGSLayer *)layer {
&amp;nbsp;&amp;nbsp;&amp;nbsp; NSLog(@"Layer %@ loaded OK", layer.name);
}

- (void)layer:(AGSLayer *)layer didFailToLoadWithError:(NSError *)error {
&amp;nbsp;&amp;nbsp;&amp;nbsp; NSLog(@"Failed to load layer: %@", error.localizedDescription);
}&lt;/PRE&gt;&lt;P&gt;That should give you a log of why the layer is failing to load (which will prevent the map loading).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 23:37:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/base-map-not-loading-with-vpn-connection/m-p/94724#M935</guid>
      <dc:creator>Nicholas-Furness</dc:creator>
      <dc:date>2021-12-10T23:37:07Z</dc:date>
    </item>
    <item>
      <title>Re: base map not loading with VPN connection</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/base-map-not-loading-with-vpn-connection/m-p/94725#M936</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Nicholas.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That helps and the problem is I need to import certificate to bundle. Then need to add the followings:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;// 1. import certificate
&lt;SPAN style="color: #000000;"&gt;[&lt;/SPAN&gt;&lt;SPAN style="color: #4f8187;"&gt;AGSCredential&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;importCertificateData&lt;SPAN style="color: #000000;"&gt;:cerData &lt;/SPAN&gt;password&lt;SPAN style="color: #000000;"&gt;:&lt;/SPAN&gt;&lt;SPAN style="color: #bb2ca2;"&gt;nil&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;overwrite&lt;SPAN style="color: #000000;"&gt;:&lt;/SPAN&gt;&lt;SPAN style="color: #bb2ca2;"&gt;NO&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;error&lt;SPAN style="color: #000000;"&gt;:&amp;amp;error];&lt;/SPAN&gt;

&lt;SPAN style="color: #000000;"&gt;// 2. trust base map url connection&lt;/SPAN&gt;
&lt;SPAN style="color: #000000;"&gt;[[&lt;SPAN style="color: #703daa;"&gt;NSURLConnection&lt;/SPAN&gt; &lt;SPAN style="color: #31595d;"&gt;ags_trustedHosts&lt;/SPAN&gt;] &lt;SPAN style="color: #3d1d81;"&gt;addObject&lt;/SPAN&gt;:[mapURL &lt;SPAN style="color: #3d1d81;"&gt;host&lt;/SPAN&gt;]];&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now everything works fine.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 23:37:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/base-map-not-loading-with-vpn-connection/m-p/94725#M936</guid>
      <dc:creator>QKunZhu</dc:creator>
      <dc:date>2021-12-10T23:37:09Z</dc:date>
    </item>
    <item>
      <title>Re: base map not loading with VPN connection</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/base-map-not-loading-with-vpn-connection/m-p/94726#M937</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Excellent. Thanks for letting me know!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nick.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jan 2016 04:12:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/base-map-not-loading-with-vpn-connection/m-p/94726#M937</guid>
      <dc:creator>Nicholas-Furness</dc:creator>
      <dc:date>2016-01-21T04:12:33Z</dc:date>
    </item>
  </channel>
</rss>

