-
Notifications
You must be signed in to change notification settings - Fork 118
Description
In some cases Google Places API returns empty types array, for example Dallas/Fort Worth International Airport. In that case type = types.firstObject as NSString crashes
{
"long_name" = 2375;
"short_name" = 2375;
types = (
"street_number"
);
},
{
"long_name" = "Dallas/Fort Worth International Airport";
"short_name" = "Dallas/Fort Worth International Airport";
types = (
);
},
{
"long_name" = "International Parkway";
"short_name" = "International Pkwy";
types = (
route
);
},
{
"long_name" = Dallas;
"short_name" = Dallas;
types = (
locality,
political
);
},
{
"long_name" = "Tarrant County";
"short_name" = "Tarrant County";
types = (
"administrative_area_level_2",
political
);
},
{
"long_name" = Texas;
"short_name" = TX;
types = (
"administrative_area_level_1",
political
);
},
{
"long_name" = "United States";
"short_name" = US;
types = (
country,
political
);
},
{
"long_name" = 75261;
"short_name" = 75261;
types = (
"postal_code"
);
}
)