<?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: load tables and layers problem - SQLite cannot open. 1014 in ArcGIS Runtime SDK for iOS Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/load-tables-and-layers-problem-sqlite-cannot-open/m-p/1231093#M7514</link>
    <description>&lt;P&gt;I found property in UserDefaults.standard with key =&amp;nbsp;"com.esri.arcgis.runtime.tempSubdirectory"&lt;/P&gt;&lt;P&gt;where is kept the name of this mystery subdirectory which is created by arcgis runtime&lt;/P&gt;&lt;P&gt;I will use this name to exclude it from deleting from temp directory&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I cant find information about this property in ArcGis Runtime iOS documentation, maybe somebody knows something about it?&lt;/P&gt;&lt;P&gt;I&amp;nbsp; also tried to set this property to my subdirectory, but it is impossible, in these case arcgis runtime works incorrectly too.&lt;/P&gt;</description>
    <pubDate>Sun, 13 Nov 2022 21:07:15 GMT</pubDate>
    <dc:creator>MaksimsSenko</dc:creator>
    <dc:date>2022-11-13T21:07:15Z</dc:date>
    <item>
      <title>load tables and layers problem - SQLite cannot open. 1014</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/load-tables-and-layers-problem-sqlite-cannot-open/m-p/1230901#M7513</link>
      <description>&lt;P&gt;i get error on this line&lt;/P&gt;&lt;P&gt;code:&lt;/P&gt;&lt;P&gt;mapImageLayer.loadTablesAndLayers(completion: { [weak self] error in&lt;BR /&gt;self?.setupSublayers()&lt;BR /&gt;})&lt;/P&gt;&lt;P&gt;ArcGIS Runtime Error Occurred. Set a breakpoint on C++ exceptions to see the original callstack and context for this error: Error Domain=com.esri.arcgis.runtime.error Code=1014 "SQLite cannot open." UserInfo={NSLocalizedFailureReason=SQLite: 14&lt;BR /&gt;Unable to open the database file, NSLocalizedDescription=SQLite cannot open., Additional Message=SQLite: 14&lt;BR /&gt;Unable to open the database file}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;after long research i found that it hapends after my app removes all data from temporary folder&lt;/P&gt;&lt;P&gt;func clearTmpDirectory() {&lt;BR /&gt;do {&lt;BR /&gt;let tmpDirURL = FileManager.default.temporaryDirectory&lt;BR /&gt;let tmpDirectory = try contentsOfDirectory(atPath: tmpDirURL.path)&lt;BR /&gt;try tmpDirectory.forEach { file in&lt;BR /&gt;let fileUrl = tmpDirURL.appendingPathComponent(file)&lt;BR /&gt;try removeItem(atPath: fileUrl.path)&lt;BR /&gt;}&lt;BR /&gt;} catch {&lt;BR /&gt;print("Failed to clear tmp folder")&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;i found that there is some folder that first creates when arcgis license is set&lt;/P&gt;&lt;P&gt;let result = try self.setLicenseKey("runtimelite,1000,**,none,***")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;this folder dont recreates after second license set&lt;/P&gt;&lt;P&gt;it creates only when app is fully rebooted&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;before clearing temp directory layers and tables load works fine without problem&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;is this a bug or i do something incorrect?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;in my business logic i need clear temp directory after user make logout, i cant skip this part.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Nov 2022 14:42:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/load-tables-and-layers-problem-sqlite-cannot-open/m-p/1230901#M7513</guid>
      <dc:creator>MaksimsSenko</dc:creator>
      <dc:date>2022-11-11T14:42:00Z</dc:date>
    </item>
    <item>
      <title>Re: load tables and layers problem - SQLite cannot open. 1014</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/load-tables-and-layers-problem-sqlite-cannot-open/m-p/1231093#M7514</link>
      <description>&lt;P&gt;I found property in UserDefaults.standard with key =&amp;nbsp;"com.esri.arcgis.runtime.tempSubdirectory"&lt;/P&gt;&lt;P&gt;where is kept the name of this mystery subdirectory which is created by arcgis runtime&lt;/P&gt;&lt;P&gt;I will use this name to exclude it from deleting from temp directory&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I cant find information about this property in ArcGis Runtime iOS documentation, maybe somebody knows something about it?&lt;/P&gt;&lt;P&gt;I&amp;nbsp; also tried to set this property to my subdirectory, but it is impossible, in these case arcgis runtime works incorrectly too.&lt;/P&gt;</description>
      <pubDate>Sun, 13 Nov 2022 21:07:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/load-tables-and-layers-problem-sqlite-cannot-open/m-p/1231093#M7514</guid>
      <dc:creator>MaksimsSenko</dc:creator>
      <dc:date>2022-11-13T21:07:15Z</dc:date>
    </item>
    <item>
      <title>Re: load tables and layers problem - SQLite cannot open. 1014</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/load-tables-and-layers-problem-sqlite-cannot-open/m-p/1231514#M7515</link>
      <description>&lt;P&gt;Thank you for your question. &amp;nbsp;The arcgis subdirectory is for internal use only, and shouldn't be modified or, as you found out, things may not work correctly. &amp;nbsp;In general, it is not recommended to delete the temp folder contents of a running app as you may not know who/what has been storing files there.&lt;/P&gt;&lt;P&gt;I would recommend storing your temporary files that you may need to delete in a dedicated folder inside the temp directory and then just delete the files in that folder when necessary. &amp;nbsp;This will separate out your files from those that the ArcGIS SDK need (and other temporary files).&lt;/P&gt;&lt;P&gt;Let us know if you have any further questions.&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;</description>
      <pubDate>Mon, 14 Nov 2022 23:06:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/load-tables-and-layers-problem-sqlite-cannot-open/m-p/1231514#M7515</guid>
      <dc:creator>MarkDostal</dc:creator>
      <dc:date>2022-11-14T23:06:53Z</dc:date>
    </item>
  </channel>
</rss>

