I have suddenly started getting the following error when I applyEdits to save a new feature or modify an existing feature in and ArcGIS Swift SDK app I've been working on, and which has worked fine for several months:
Save new feature error:
JSONError(kind: ArcGIS.JSONError.Kind.invalidJSON, details: "The supplied JSON could not be parsed")
up on the execution of the applyEdits() method in the below code:
Task {
do {
// Add the new feature to the local table
try await featureTable!.add(feature!)
if model.featureLayerSourceType(featureLayer: model.activeFeatureLayer!) == .serviceFeatureTable {
let serviceFeatureTable = featureTable as? ServiceFeatureTable
_ = try await serviceFeatureTable!.applyEdits()
} else {
}
} catch {
print("Save new feature error:")
print(error)
}
dismiss()
}
I am wondering what has changed. I have had to rebuild my AcGIS server instance because of a hardware failure this week, so maybe that has been set up slightly different to before.
I have also had to debug the app and have also recently upgraded to Xcode 16 on Mac, for which I need the ArcGIS Dev Swift Pack 200.5.1 so I'm wondering if that upgrade has also upset something.
Anyone else seen anything similar?
Otherwise I haven't changed any code at all in the Swift app and suddenly it is not working.
Thanks