Open ivangarcialopez opened 7 years ago
Hello,
Anybody has a similar problem?
Hi @ivangarcialopez sorry to hear you're having trouble. In order for the button to show ride information, you need to have a valid access token or include your server token in your info.plist
Is your problem that that the ETA is not appearing or an issue with resizing the button that is cutting off the ETA information?
When investigating this error, are you seeing the .fetchCheapestProduct
call succeed with a non-nil product ID?
lgtm
Hanjun
On Wed, Feb 1, 2017 at 5:22 AM, John Brophy notifications@github.com wrote:
Hi @ivangarcialopez https://github.com/ivangarcialopez sorry to hear you're having trouble. In order for the button to show ride information, you need to have a valid access token or include your server token in your info.plist
Is your problem that that the ETA is not appearing or an issue with resizing the button that is cutting off the ETA information?
When investigating this error, are you seeing the .fetchCheapestProduct call succeed with a non-nil product ID?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/uber/rides-ios-sdk/issues/147#issuecomment-276496669, or mute the thread https://github.com/notifications/unsubscribe-auth/ACW3y36dpLqEvdUbDxkac-IYDJ9MYttKks5rX6YrgaJpZM4LQ-8g .
i use android ;-p
On Jan 28, 2017 1:44 AM, "ivangarcialopez" notifications@github.com wrote:
Hello,
Anybody has a similar problem?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/uber/rides-ios-sdk/issues/147#issuecomment-275726599, or mute the thread https://github.com/notifications/unsubscribe-auth/ACW3y-ecL767zV_oYUbrzrxHxgcL4HfJks5rWizpgaJpZM4LQ-8g .
I am seeing a similar issue. Code almost identical. I do see ETA and .fetchCheapestProduct does succeed with non-nil product ID but I never see a price...
And it just started working.
@javaboyjunior Did you find a solution to the problem of price not showing up? I am having that issue and can't seem to resolve it.
@seanperez29 are you including the server token in your app?
https://developer.uber.com/docs/riders/ride-requests/tutorials/button/ios#add-a-server-token
Closing since this is an old thread. I'll reopen if there's a reply! :)
I am getting the same issue as well in my iOS app. No estimation (whether time or price) showing up in my button
Are you including the server token as well?
I am. I had to 'fetchProducts' and then use one of the products productID values and attach it to RideParametersBuilder in order to get it to work. I understood from documentation that it should be optional:
Optional product_id from /v1/products endpoint (e.g. UberX). If not provided, most cost-efficient product will be used
Sorry for the bump but is this that the only solution to this issue now? I've noticed that fetchCheapestProduct() was removed from the SDK in a previous update so what would be the best way to display the prices now? I can't seem to get it to work. Should I be using fetchProducts like the previous commenter did? How can I get the needed product ID the easiest way?
The issue is kind of funny and I think uber should change there documentation. You need to fetch products and price estimates and then loadRideInformation(). Guess what! the default button width is smaller than required. detail answer..
uberClient.fetchProducts(pickupLocation: pickupLocation, completion: { (Products, _) in
if (Products[0].productID != nil){
uberClient.fetchPriceEstimates(pickupLocation: pickupLocation, dropoffLocation: dropoffLocation) { (priceEstimates, Response) in
SKActivityIndicator.dismiss()// used for loading animation, ignore if not not needed
builder.pickupLocation = pickupLocation
builder.pickupAddress = "pickup Address"
builder.pickupNickname = "pickup nick"
builder.dropoffLocation = dropoffLocation
builder.dropoffAddress = "drop Address"
builder.dropoffNickname = "drop nick"
builder.productID = Products[0].productID
uberReqButton.rideParameters = builder.build()
DispatchQueue.main.async {
uberReqButton.loadRideInformation()
}
}
}
})
Hello,
We have added the request ride button to our app in iOS and Android. In Android is working fine because the app shows the ETA and best service available but the iOS app doesn't.
Those are the problems that we have:
This is the code I use to show the button:
func showUberButton(){
Kind regards.