Closed DoomyTheFroomy closed 10 years ago
According to the spec, location is a top level field, not a structure field.
That's right... so i have to change it, so that locations can be used with the add
function without changing the structure...
If you only move "locations" from TOP_LEVEL to STRUCTURE_FIELDS, the pass.json like:
"coupon" : {
"locations" : [
{
"longitude" : -122.3748889,
"latitude" : 37.6189722
}
],
"auxiliaryFields" : [
{
"key" : "expires",
"label" : "EXPIRES",
"value" : "2013-4-21"
}
]
}
not added to the top level, but "To provide relevant locations, add the locations key at the top level of the pass."(PassKit_PG), so the locations may be invalid.
The locations Parameter is an Array so it would be better to use it with the add function. So dynamically locations can be added!