<?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: Error Removing Single/Sequence Operational Layer(s) but removing all works? Maps SDK 200.1.0 in Swift Maps SDK Questions</title>
    <link>https://community.esri.com/t5/swift-maps-sdk-questions/error-removing-single-sequence-operational-layer-s/m-p/1298649#M80</link>
    <description>&lt;P&gt;Thanks for reporting! This bug will be fixed in the next release of the SDK. It is due to a misuse of the mutable array in the SDK.&lt;/P&gt;&lt;P&gt;In the meantime, you can still use the "remove all" approach, or set the &lt;FONT face="courier new,courier"&gt;&lt;A href="https://developers.arcgis.com/swift/api-reference/documentation/arcgis/layer/isvisible" target="_blank" rel="noopener"&gt;isVisible&lt;/A&gt;&lt;/FONT&gt;&amp;nbsp;property on the layers to show/hide a layer.&lt;/P&gt;</description>
    <pubDate>Tue, 13 Jun 2023 16:22:45 GMT</pubDate>
    <dc:creator>Ting</dc:creator>
    <dc:date>2023-06-13T16:22:45Z</dc:date>
    <item>
      <title>Error Removing Single/Sequence Operational Layer(s) but removing all works? Maps SDK 200.1.0</title>
      <link>https://community.esri.com/t5/swift-maps-sdk-questions/error-removing-single-sequence-operational-layer-s/m-p/1294824#M75</link>
      <description>&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;Here is a method that toggles the state of a boolean variable called imageryOn.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;When I tap a button the code runs, and I am able to set the first object in the Operational Layers array as a&amp;nbsp;ArcGISTiledLayer. Cool, tapping the on screen button shows the satellite imagery hosted service on the map and sets it to Operational Layers at index 0.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;When I toggle the imageryOn bool to false I get an error message&amp;nbsp;when trying to remove the first operational layer:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Thread 1: Fatal error: Object is already in use and may not be reused.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, if I used the removeAllOperationalLayers method I am able to remove all operational layers (including the imagery layer). And the toggle then just shows imagery on and then imagery off.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;func&lt;/STRONG&gt;&lt;/SPAN&gt; toggleImagery&lt;SPAN&gt;(){&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;imageryOn&lt;SPAN&gt; = !&lt;/SPAN&gt;imageryOn&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;print&lt;/SPAN&gt;(&lt;SPAN&gt;map&lt;/SPAN&gt;.operationalLayers)&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;&lt;STRONG&gt;if&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN&gt;imageryOn&lt;/SPAN&gt; {&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;STRONG&gt;let&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN&gt; imageryLayer = ArcGISTiledLayer(url: &lt;/SPAN&gt;&lt;SPAN&gt;URL&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;string&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;"&lt;A href="https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer" target="_blank" rel="noopener"&gt;https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer&lt;/A&gt;"&lt;SPAN&gt;)!)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;map&lt;/SPAN&gt;.insertOperationalLayer(imageryLayer, at: &lt;SPAN&gt;0&lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;print&lt;/SPAN&gt;(&lt;SPAN&gt;map&lt;/SPAN&gt;.operationalLayers.&lt;SPAN&gt;first&lt;/SPAN&gt;!)&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;print&lt;/SPAN&gt;(&lt;SPAN&gt;map&lt;/SPAN&gt;.operationalLayers)&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;} &lt;SPAN&gt;&lt;STRONG&gt;else&lt;/STRONG&gt;&lt;/SPAN&gt; {&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;map&lt;/SPAN&gt;.removeOperationalLayer(&lt;SPAN&gt;map&lt;/SPAN&gt;.operationalLayers[&lt;SPAN&gt;0&lt;/SPAN&gt;])&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //map.removeAllOperationalLayers()&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;}&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas on what could be going on here?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 31 May 2023 22:38:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/swift-maps-sdk-questions/error-removing-single-sequence-operational-layer-s/m-p/1294824#M75</guid>
      <dc:creator>vansant</dc:creator>
      <dc:date>2023-05-31T22:38:59Z</dc:date>
    </item>
    <item>
      <title>Re: Error Removing Single/Sequence Operational Layer(s) but removing all works? Maps SDK 200.1.0</title>
      <link>https://community.esri.com/t5/swift-maps-sdk-questions/error-removing-single-sequence-operational-layer-s/m-p/1294835#M76</link>
      <description>&lt;P&gt;Thanks for reporting this bug &lt;span class="lia-unicode-emoji" title=":bug:"&gt;🐛&lt;/span&gt;. It seems like a regression between 200.0.0 and 200.1.0 - in the recent release we adjusted some error logic that might have caused it. Will share more details once our team discuss the root cause.&lt;/P&gt;</description>
      <pubDate>Wed, 31 May 2023 23:34:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/swift-maps-sdk-questions/error-removing-single-sequence-operational-layer-s/m-p/1294835#M76</guid>
      <dc:creator>Ting</dc:creator>
      <dc:date>2023-05-31T23:34:29Z</dc:date>
    </item>
    <item>
      <title>Re: Error Removing Single/Sequence Operational Layer(s) but removing all works? Maps SDK 200.1.0</title>
      <link>https://community.esri.com/t5/swift-maps-sdk-questions/error-removing-single-sequence-operational-layer-s/m-p/1298649#M80</link>
      <description>&lt;P&gt;Thanks for reporting! This bug will be fixed in the next release of the SDK. It is due to a misuse of the mutable array in the SDK.&lt;/P&gt;&lt;P&gt;In the meantime, you can still use the "remove all" approach, or set the &lt;FONT face="courier new,courier"&gt;&lt;A href="https://developers.arcgis.com/swift/api-reference/documentation/arcgis/layer/isvisible" target="_blank" rel="noopener"&gt;isVisible&lt;/A&gt;&lt;/FONT&gt;&amp;nbsp;property on the layers to show/hide a layer.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Jun 2023 16:22:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/swift-maps-sdk-questions/error-removing-single-sequence-operational-layer-s/m-p/1298649#M80</guid>
      <dc:creator>Ting</dc:creator>
      <dc:date>2023-06-13T16:22:45Z</dc:date>
    </item>
    <item>
      <title>Re: Error Removing Single/Sequence Operational Layer(s) but removing all works? Maps SDK 200.1.0</title>
      <link>https://community.esri.com/t5/swift-maps-sdk-questions/error-removing-single-sequence-operational-layer-s/m-p/1298651#M81</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/440371"&gt;@Ting&lt;/a&gt;&amp;nbsp;thank you for looking into this and posting back with info on the resolution. Any idea on when the next release of the SDK will be available?&lt;/P&gt;&lt;P&gt;Thanks again!&lt;/P&gt;</description>
      <pubDate>Tue, 13 Jun 2023 16:29:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/swift-maps-sdk-questions/error-removing-single-sequence-operational-layer-s/m-p/1298651#M81</guid>
      <dc:creator>vansant</dc:creator>
      <dc:date>2023-06-13T16:29:07Z</dc:date>
    </item>
    <item>
      <title>Re: Error Removing Single/Sequence Operational Layer(s) but removing all works? Maps SDK 200.1.0</title>
      <link>https://community.esri.com/t5/swift-maps-sdk-questions/error-removing-single-sequence-operational-layer-s/m-p/1298664#M82</link>
      <description>&lt;P&gt;If everything go smoothly, typically it will be released around August.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Jun 2023 16:48:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/swift-maps-sdk-questions/error-removing-single-sequence-operational-layer-s/m-p/1298664#M82</guid>
      <dc:creator>Ting</dc:creator>
      <dc:date>2023-06-13T16:48:23Z</dc:date>
    </item>
    <item>
      <title>Re: Error Removing Single/Sequence Operational Layer(s) but removing all works? Maps SDK 200.1.0</title>
      <link>https://community.esri.com/t5/swift-maps-sdk-questions/error-removing-single-sequence-operational-layer-s/m-p/1318623#M109</link>
      <description>&lt;P&gt;I am noticing this same error when the app is forced into the background. &amp;nbsp;I have several operational layers on my Mobile Scene and when the user swipes up to force the app into the background I get a crash with the message: &amp;nbsp;"Fatal Error: &amp;nbsp;Object is already in use and may not be reused."&lt;/P&gt;</description>
      <pubDate>Tue, 15 Aug 2023 11:07:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/swift-maps-sdk-questions/error-removing-single-sequence-operational-layer-s/m-p/1318623#M109</guid>
      <dc:creator>alionthego</dc:creator>
      <dc:date>2023-08-15T11:07:13Z</dc:date>
    </item>
    <item>
      <title>Re: Error Removing Single/Sequence Operational Layer(s) but removing all works? Maps SDK 200.1.0</title>
      <link>https://community.esri.com/t5/swift-maps-sdk-questions/error-removing-single-sequence-operational-layer-s/m-p/1319363#M110</link>
      <description>&lt;P&gt;Should be fixed now in&amp;nbsp;&lt;A href="https://developers.arcgis.com/swift/" rel="nofollow" target="_blank"&gt;ArcGIS Maps SDK for Swift&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;200.2!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Aug 2023 21:27:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/swift-maps-sdk-questions/error-removing-single-sequence-operational-layer-s/m-p/1319363#M110</guid>
      <dc:creator>Ting</dc:creator>
      <dc:date>2023-08-16T21:27:43Z</dc:date>
    </item>
    <item>
      <title>Re: Error Removing Single/Sequence Operational Layer(s) but removing all works? Maps SDK 200.1.0</title>
      <link>https://community.esri.com/t5/swift-maps-sdk-questions/error-removing-single-sequence-operational-layer-s/m-p/1319414#M111</link>
      <description>&lt;P&gt;Confirmed working with 200.2!!&lt;/P&gt;</description>
      <pubDate>Wed, 16 Aug 2023 23:46:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/swift-maps-sdk-questions/error-removing-single-sequence-operational-layer-s/m-p/1319414#M111</guid>
      <dc:creator>vansant</dc:creator>
      <dc:date>2023-08-16T23:46:30Z</dc:date>
    </item>
    <item>
      <title>Re: Error Removing Single/Sequence Operational Layer(s) but removing all works? Maps SDK 200.1.0</title>
      <link>https://community.esri.com/t5/swift-maps-sdk-questions/error-removing-single-sequence-operational-layer-s/m-p/1319469#M112</link>
      <description>&lt;P&gt;Not sure if I should raise a separate issue but this has not resolved my problem. &amp;nbsp;Updated to 200.2, App with scene containing operational layers is crashing every time I force app into background while scene is displayed with he error&amp;nbsp;&lt;SPAN&gt;"Fatal Error: &amp;nbsp;Object is already in use and may not be reused." &amp;nbsp;If the layers are removed before forcing app into background I do not get this error. &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Aug 2023 07:48:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/swift-maps-sdk-questions/error-removing-single-sequence-operational-layer-s/m-p/1319469#M112</guid>
      <dc:creator>alionthego</dc:creator>
      <dc:date>2023-08-17T07:48:31Z</dc:date>
    </item>
    <item>
      <title>Re: Error Removing Single/Sequence Operational Layer(s) but removing all works? Maps SDK 200.1.0</title>
      <link>https://community.esri.com/t5/swift-maps-sdk-questions/error-removing-single-sequence-operational-layer-s/m-p/1379620#M208</link>
      <description>&lt;P&gt;I'm on ArcGIS 200.3 and I also see " Object is already in use and may not be reused." sporadically. I doesn't happen when doing any explicit mutations, so I'm not sure why this happens, but it may happen as a result of re-rendering the SwiftUI view hierarchy. It may be that views are getting new implicit ids, and that the view model (ObservableObject) is reused, and this causes issues. I'm not sure.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Feb 2024 13:12:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/swift-maps-sdk-questions/error-removing-single-sequence-operational-layer-s/m-p/1379620#M208</guid>
      <dc:creator>sveinhal</dc:creator>
      <dc:date>2024-02-08T13:12:59Z</dc:date>
    </item>
    <item>
      <title>Re: Error Removing Single/Sequence Operational Layer(s) but removing all works? Maps SDK 200.1.0</title>
      <link>https://community.esri.com/t5/swift-maps-sdk-questions/error-removing-single-sequence-operational-layer-s/m-p/1527019#M370</link>
      <description>&lt;P&gt;I face a similar issue, when in a navigation stack I navigate back to my config screen from the Map screen, I get this fatal error. Strangely when I have my Map component in our UIKit framework , it works fine. I get this error only in our test application which is built with SwiftUI.&lt;/P&gt;&lt;P&gt;Were you able to solve this?&lt;/P&gt;</description>
      <pubDate>Mon, 26 Aug 2024 11:22:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/swift-maps-sdk-questions/error-removing-single-sequence-operational-layer-s/m-p/1527019#M370</guid>
      <dc:creator>zdtorok</dc:creator>
      <dc:date>2024-08-26T11:22:00Z</dc:date>
    </item>
    <item>
      <title>Re: Error Removing Single/Sequence Operational Layer(s) but removing all works? Maps SDK 200.1.0</title>
      <link>https://community.esri.com/t5/swift-maps-sdk-questions/error-removing-single-sequence-operational-layer-s/m-p/1528144#M371</link>
      <description>&lt;P&gt;There were multiple issues in the past few releases regarding NavigationStack, the operational layer array insertion bug, and iOS 15/16/17 navigation behavior differences. Some of the problem we were able to resolve on our end, some were addressed by Apple in iOS 17, and some are temporarily fixed with patches. If possible, can you adopt 200.4.0 or 200.5.0 version of the SDK to see if the problems are addressed? If not, feel free to open a new question and we can look further into it.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Aug 2024 19:27:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/swift-maps-sdk-questions/error-removing-single-sequence-operational-layer-s/m-p/1528144#M371</guid>
      <dc:creator>Ting</dc:creator>
      <dc:date>2024-08-27T19:27:25Z</dc:date>
    </item>
  </channel>
</rss>

