i get error on this line
code:
mapImageLayer.loadTablesAndLayers(completion: { [weak self] error in
self?.setupSublayers()
})
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
Unable to open the database file, NSLocalizedDescription=SQLite cannot open., Additional Message=SQLite: 14
Unable to open the database file}
after long research i found that it hapends after my app removes all data from temporary folder
func clearTmpDirectory() {
do {
let tmpDirURL = FileManager.default.temporaryDirectory
let tmpDirectory = try contentsOfDirectory(atPath: tmpDirURL.path)
try tmpDirectory.forEach { file in
let fileUrl = tmpDirURL.appendingPathComponent(file)
try removeItem(atPath: fileUrl.path)
}
} catch {
print("Failed to clear tmp folder")
}
}
i found that there is some folder that first creates when arcgis license is set
let result = try self.setLicenseKey("runtimelite,1000,**,none,***")
this folder dont recreates after second license set
it creates only when app is fully rebooted
before clearing temp directory layers and tables load works fine without problem
is this a bug or i do something incorrect?
in my business logic i need clear temp directory after user make logout, i cant skip this part.