Fixed
Status Update
Comments
mr...@google.com <mr...@google.com> #2
Thanks for reporting this. To help diagnosing the issue, would you be able to provide the following information:
- How long does the method take for you under 1.13.2?
- Are you testing inside or outside?
- Is it consistently slow on cellular, or does it get faster after a few attempts?
- How long does the method take for you under 1.13.2?
- Are you testing inside or outside?
- Is it consistently slow on cellular, or does it get faster after a few attempts?
da...@gmail.com <da...@gmail.com> #3
When using celluar it usually takes 2-4 seconds to get a response on 1.13.2.
I have tested both inside and outside and the issue seems to be consistent (Tested for over 24 hours).
I have tested both inside and outside and the issue seems to be consistent (Tested for over 24 hours).
mr...@google.com <mr...@google.com>
mr...@google.com <mr...@google.com> #4
This issue should have been fixed with the 2.1.1 release of the iOS Places API. This release shortens the timeout of currentPlaceWithCallback to match Android.
Description
What could be causing this?
This is where the function is called:
func setCurrentPlace(completion: (([GMSPlace]?, error: NSError?) -> ())?) -> Void {
NSLog("*** Start setCurrentPlace ***")
placesClient?.currentPlaceWithCallback({ (placeLikelihoodList, error) in
if let error = error {
NSLog("Pick Place error: \(error.localizedDescription)")
completion?(nil, error: error)
return
} else {
if let placeLikelihoodList = placeLikelihoodList {
var currentPlaces: [GMSPlace] = []
for i in 0..<placeLikelihoodList.likelihoods.count {
let place = placeLikelihoodList.likelihoods[i].place as GMSPlace
let types = place.types
if (types.count > 2) {
currentPlaces.append(place)
} else if (!types.contains("point_of_interest") && !types.contains("establishment")){
currentPlaces.append(place)
}
if (currentPlaces.count > 11) { break } // Legger ikke til mer enn 12 steder
}
if let thisPlace = currentPlaces.first {
if (thisPlace.placeID != self.previousPlaceId) {
self.localUser?.saveCurrentPlaceToParse(thisPlace)
}
}
NSLog("--- Fetched current places ---")
self.previousPlaceId = currentPlaces.first?.placeID
completion?(currentPlaces, error: nil)
} else {
completion?(nil, error: NSError(domain: "NOPLACE", code:666 , userInfo: nil))
}
}
})
Operating system version: 10.0.2
Google Places API for iOS version: 2.1
Hardware model: Tested on iPhone 5s and iPhone SE
*********************************************************
For developers viewing this issue: please click the 'star' icon to be
notified of future changes, and to let us know how many of you are
interested in seeing it resolved.
*********************************************************