<?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 Inserting map layer crash. in ArcGIS Runtime SDK for iOS Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/inserting-map-layer-crash/m-p/670402#M5965</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi, I am using the latest ios SDK release and whenever I switch layers the application crashes with the following error.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://i.imgur.com/uVPaps4.png"&gt;&lt;IMG src="http://i.imgur.com/uVPaps4.png" /&gt;&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If I try to add any layer at all without a name it crashes with this error.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If I give it a name the tpks will work when I first load the map but if I try to change the TPK later on it will crash with the same error. From what i'm guessing is it thinks the name is null however, If you look at the log statement right above the line it crashed on you can clearly see the layer name is not null.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 26 Jul 2013 04:33:30 GMT</pubDate>
    <dc:creator>brettlamy</dc:creator>
    <dc:date>2013-07-26T04:33:30Z</dc:date>
    <item>
      <title>Inserting map layer crash.</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/inserting-map-layer-crash/m-p/670402#M5965</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi, I am using the latest ios SDK release and whenever I switch layers the application crashes with the following error.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://i.imgur.com/uVPaps4.png"&gt;&lt;IMG src="http://i.imgur.com/uVPaps4.png" /&gt;&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If I try to add any layer at all without a name it crashes with this error.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If I give it a name the tpks will work when I first load the map but if I try to change the TPK later on it will crash with the same error. From what i'm guessing is it thinks the name is null however, If you look at the log statement right above the line it crashed on you can clearly see the layer name is not null.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jul 2013 04:33:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/inserting-map-layer-crash/m-p/670402#M5965</guid>
      <dc:creator>brettlamy</dc:creator>
      <dc:date>2013-07-26T04:33:30Z</dc:date>
    </item>
    <item>
      <title>Re: Inserting map layer crash.</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/inserting-map-layer-crash/m-p/670403#M5966</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So long as the tpk resource is in your project, maybe you could try to display the resource this way? I was having similar problems and this solved the issue for me. Also make sure that your tpk file is included in your copy bundle resources.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
NSString *mobilePath = [[NSBundle mainBundle] pathForResource:@"YourTPKName" ofType:@"tpk"];
AGSLocalTiledLayer *tiledLayer = [AGSLocalTiledLayer localTiledLayerWithPath:mobilePath];
[mapView insertMapLayer:tiledLayer withName:@"Choose a name here for access later" atIndex:0];
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 04:18:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/inserting-map-layer-crash/m-p/670403#M5966</guid>
      <dc:creator>ChristopherBarger</dc:creator>
      <dc:date>2021-12-12T04:18:02Z</dc:date>
    </item>
  </channel>
</rss>

