Fatal Error: Duplicate Keys of Type 'Geocoded Placemark' Were Found in a Dictionary. (Mapbox Geocoder)

Duplicate keys of type ... were found in a Dictionary when there is no Dictionary?

I think you are missing a full conformance to the Hashable Protocol

Pay attention to the func hash(into hasher: inout Hasher) function which you are missing

How to avoid duplicate key error in swift when iterating over a dictionary

Each dictionary key MUST be unique

let people = ["age1":14, "age2":15, "age3":75, "age4":43, "age5":103, "age6":87, "age7":12]
for (key, value) in people {
print(value)
}


Related Topics



Leave a reply



Submit