uber / rides-ios-sdk Goto Github PK
View Code? Open in Web Editor NEWUber Rides iOS SDK (beta)
Home Page: https://developer.uber.com/docs
License: MIT License
Uber Rides iOS SDK (beta)
Home Page: https://developer.uber.com/docs
License: MIT License
Hello! I want to know if this is a bug. When I set the product id for let's say a Deep Link Behavior. I get the correct product on the Uber app. But when I switch to UBSDKRideRequestViewRequestingBehavior. The product does not seem to be highlighted. Did I miss something the implementation? Thanks!
UBSDKRideParametersBuilder *builder = [[UBSDKRideParametersBuilder alloc] init];
[builder setProductID:myRideData[@"productID"]];
CLLocation *pickupLocation = [[CLLocation alloc] initWithLatitude:[originCoordsLat doubleValue] longitude:[originCoordsLng doubleValue]];
[builder setPickupLocation:pickupLocation nickname:originAddress];
CLLocation *dropoffLocation = [[CLLocation alloc] initWithLatitude:[destinationCoordsLat doubleValue] longitude:[destinationCoordsLng doubleValue]];
[builder setDropoffLocation:dropoffLocation nickname:destinationAddress];
// You can chain builder function calls
UBSDKRideParameters *rideParameters = [builder build];
I have not installed uber in my iPhone, so uber is opening a URL in Safari. It is okay, Safari says could not load URL. Why ??
Really i don't wanna open Safari if it is not opening a proper page. I don't wanna create a bad user experience.
Would you give a chance for developers to decide choose way to open the URL ? via Uber app or via Safari.
Can you please tell me if i can add a custom button to my view and request uber ride on that button tap? And if i can how can i do it? @jbrophy17 @faarwa
Currently the Ride Request Widget only exposes a delegate for errors. It would be useful to expose some indicator of the trip status, as it changes. Possibly via the delegate or a notification.
In order to display the destination in the Uber app, a drop off nickname or formatted address must be included (see #1). The examples in the readme need to reflect this
In RequestDeeplink.swift, in method createURL line 165, the string added to the URL when using .Deeplink is missing a '&' at the beginning: should be "&user-agent=rides-deeplink-v0.1.0"
Hello as it documented in the the section
All the button needs to gather this additional information is your server token to be configured in the Info.plist as described in the SDK Configuration section. To display a time estimate, set the product ID and pickup location. To display a price estimate, you need to additionally set a dropoff location
So when I go back to SDK Configuration section i am unable to find the information for which server token key is going to be used in the app info.plist. am i missing something ?
Attaching screenshot please confirm Server token key
When I add github "https://github.com/uber/rides-ios-sdk" ~> 0.5
, and do a carthage update
, I get the following error:
The following build commands failed:
Check dependencies
(1 failure)
A shell task (/usr/bin/xcrun xcodebuild -workspace /Users/Carthage/Checkouts/ObjectMapper/ObjectMapper.xcworkspace -scheme ObjectMapper-iOS -configuration Release -sdk iphoneos ONLY_ACTIVE_ARCH=NO BITCODE_GENERATION_MODE=bitcode CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES clean build) failed with exit code 65:
** CLEAN FAILED **
The following build commands failed:
Check dependencies
(1 failure)
** BUILD FAILED **
Using Xcode 8 Beta 3
, macOS El Capitan 10.11.6
.
Expected: A developer can request any scopes for their own application, even if it hasn't been approved yet
Actual: A developer requesting a privileged scope, via SSO, that hasn't been enabled will get an invalid_scope error.
Steps to Reproduce:
I know there is an indicator showing a ride arriving. Is it possible to show a map of the location of the vehicle just like in the app?
Please make this Carthage Compatible. It'd be a whole lot easier to integrate with a project. Thanks!
I have the URL Scheme in my .plist configured with the traditional URI but I am unable to set this in the Uber dashboard as is needs an HTTPS URL. Am I missing something?
Current example for setting up the Login Button is fairly light, a more in depth example could make getting started easier. Should layout examples using frame & autolayout
Hey there guys.
Over two weeks ago I was able to implement the logic of the Rides Client fetching up some uber price estimates properly with the UberServerToken.
Today I started testing my app again and suddendly I'm always receiving "unauthorized" in my fetchPriceEstimatesWithPickupLocation block completionHandler...
I triple checked my UberServerToken in my plist, tried adding another one imagining it was this token problem. I even made a call to the Uber API "GET /v1/estimates/price" which does the same thing as the method fetchPriceEstimatesWithPickupLocation with the same Server Token and the REST API is answering me properly, with "200 OK" and my price estimates...
Am I missing something?
hi ,i want know UBSDKRideParametersBuilder *builder = [[UBSDKRideParametersBuilder alloc] init];
[builder setProductID:@"a1111c8c-c720-46c3-8534-2fcdd730040d"];
setProductID:@"a1111c8c-c720-46c3-8534-2fcdd730040d" what this is ,, how get it
I would like to be able to handle the OAuth on my own if the user does not have the Uber app installed. I have been able to achieve this with using the LoginManager
directly with my own button.
Here's is my logic for handling it:
let loginManager = LoginManager()
loginManager.login(requestedScopes:[RidesScope.Request, RidesScope.AllTrips, RidesScope.Places], presentingViewController: self, completion: { accessToken, error in
print("Token: \( accessToken?.tokenString)")
print(error)
if error != nil {
uber.scopes = ["request", "all_trips", "places"]
uber.authorize { (result) in
switch result {
case .Success(let token) :
print("Token: \(accessToken)")
self.token = accessToken
//handle successful login
break
case .Failure(let error) :
print(error)
//handle failed login
break
}
}
}
})
A couple notes:
Will there be an update soon to incorporate the new Uber logo?
In addition to having the delegate inside of ModalRideRequestViewController
called for errors, it would be helpful for successful ride requests to call the delegate in order to easy implement custom logic around when a ride request returns a success response.
I was wondering why i could not access variable "contentHeight", the variable is public only.
public class RequestButton: UIButton { var deeplink: RequestDeeplink? var contentWidth: CGFloat = 0 var contentHeight: CGFloat = 0
See the variable is there, and when i try to access it, it does not even show up in RequestButton instance variable.
let uberButton = RequestButton() uberButton.contentHeight // The contentHeight is not showing here.
Tests pass locally but are failing on Travis-CI. Possibly an issue around using the iOS keychain, needs more investigation
Currently, using Carthage, it's not possible to upload an app to iTunesConnect. When uploading there are errors for invalid bundle.
Frameworks do not require Copy Carthage but require Linked Libraries.
Fixed by #50, will be included in the next release
I have followed the exact implementation of Uber iOS SDK in my iOS, and made sure that Callback URI schemes are registered in the uber developer dashboard which i have used in the app. But its throwing UBSDKRidesClientError. Here is my code for the button:
UBSDKRideRequestButton *button = [[UBSDKRideRequestButton alloc] init];
UBSDKRidesClient *ridesClient = [[UBSDKRidesClient alloc] init];
__block UBSDKRideParametersBuilder *builder = [[UBSDKRideParametersBuilder alloc] init];
builder = [builder setPickupLocation: pickupLocation];
builder = [builder setDropoffLocation: dropoffLocation];
[ridesClient fetchCheapestProductWithPickupLocation: pickupLocation completion:^(UBSDKUberProduct* _Nullable product, UBSDKResponse* _Nullable response) {
if (product) {
builder = [builder setProductID: product.productID];
button.rideParameters = [builder build];
[button loadRideInformation];
}
}];
Will appreciate any help
When I set the pickup location and click the button, it opens the Uber app ok, and immediately changes the pickup location from the one specified in the button to my current location.
This is all the code I have in the main ViewController
(in a minimal app that has only this):
import UIKit
import UberRides
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
let button = RequestButton()
button.setProductID("6ad061f8-9a50-4dcc-b12a-d810a0262d31")
button.setPickupLocation(
latitude: "-34.912342",
longitude: "-56.178625",
address: "Gonzalo Ramirez 1676",
nickname: "Sinergia Cowork"
)
view.addSubview(button)
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
}
}
I've tried with and without setting the product ID, with and without the address
field, and with and without the nickname
field. The result is that it always sets my request to my current location, instead of the desired location.
master
via Carthage.Hello Guys, when i copy and paste this method in my appdelegate , I get an error that UBSDKRidesAppDelegate not found. Please help
- (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<NSString *,id> *)options {
BOOL handledURL = [[UBSDKRidesAppDelegate sharedInstance] application:app openURL:url sourceApplication:options[UIApplicationOpenURLOptionsSourceApplicationKey] annotation:options[UIApplicationOpenURLOptionsAnnotationKey]];
if (!handledURL) {
// Other URL logic
}
return true;
}
Hi, I need to know how to change the text color on Ride button of our choice other than default styles and also the alignment of the text.
Will appreciate your help.
Thanks
Adeel
I couldn't seem to get the drop off location to pre-fill unless I used added a nickname, is this intentional?
[_requestButton setPickupLocationWithLatitude:pickupLat longitude:pickupLong nickname:nil address:nil];
Hi there,
When I'm trying to use Uber SSO authorization, I get an error "The provided app signature did not match what was expected" and I don't know why. What means "app signature" in this context? Is it related to the environment I'm running my code (currently working on React Native Rides SDK port)? Where can I find some info about this issue?
UPD: I don't know what has been changed, but after I created a new project and repeated all the steps one more time, I started to get a different error: "User cancelled the login process". Would be nice if you can refer me to resource with information about these error messages.
Thanks in advance! ❤️
Hello, I installed Uber Rides SDK via Cocoapods and imported <UberRides/UberRides-Swift.h> in my AppDelegate.m file. Is there anything I missed?
Would be more appropriate if the setPickupLocationWithLatitude: longitude: nickname: address:
method would use CLLocationDegrees
as type for longitude and latitude instead of NSString
.
The documentation mentions the AllTrips scope type, but it's not defined in RidesScope.swift.
I am getting this error when trying to instal uber pod. Seems like this error is because of "use_frameworks!" in pod file but don't know the exact reason
I tried to login with that code which is give below - with or without using redirect_URI but it always show error orderly
1.The Redirect URI provided did not match what was expected.
2. Invalid Redirect URI provided. or The server was unable to understand your request. most of time its crashes.
even I tried the example code It shows same error. I checked my whole project but there is no any other issue I found. Please help me to solve my issue.
Thanks
UBSDKLoginManager *loginManager = [[UBSDKLoginManager alloc]init];
NSArray<UBSDKRidesScope *> *requestedScopes = @[ UBSDKRidesScope.RideWidgets, UBSDKRidesScope.Profile, UBSDKRidesScope.Places ];
[loginManager loginWithRequestedScopes:requestedScopes presentingViewController:self completion:^(UBSDKAccessToken * _Nullable accessToken, NSError * _Nullable error) {
if (accessToken) {
//[self _showMessage:UBSDKLOC(@"Saved access token!")];
} else {
//[self _showMessage:error.localizedDescription];
}
}];
App with Uber SDK won't compile.
The Refresh endpoint is not correctly refreshing tokens when given a valid refresh token. Data is being submitted in the incorrect form
Hi,
My app was running successfully until i did a pod update. After pod update I tried clean build, close Xcode and open and build, etc but nothing worked. Its giving me 'Use of undeclared type 'RequestButton' ' and 'Type RidesClient has no member sharedInstance' (In line RidesClient.sharedInstance.configureClientID("")). Please help.
Thanks,
Hi
The SDK says it require Xcode 7.0. Why it is that ?
Will it work with Xcode 6.3 ?
Thanks
Originally we were using uber://?action=setPickup&pickup=my_location&dropoff[latitude]=%f&dropoff[longitude]=%f&dropoff[nickname]=%@
for launching Uber app with drop-off location already set. It works fine with deep-linking, but with the SDK, the nickname or address is pre-filled, but the drop-off pin is missing.
The getting started guide has been a point of some confusion. Could benefit from breaking it down into an easy to follow, step by step process
Correctly configured China based apps are unable to login via SSO. The Uber app will returns an invalid_client_id error even when the client ID is correct.
Root cause is an incorrect value being sent for login_type. A fix will be available shortly.
Passing lat/long as double values for the coordinates doesn't seem as clean as simply passing a CLLocation object (easier to directly use with Core Location's user location). [As used in UberKit: github.com/sachinkesiraju/UberKit]
How can I use it if I have no Uber app?
I am making Proof of Concept. In POC, I am using Uber SDK. I am simply following the steps for integration mentioned under the document. I am getting layout Errors for constraints. For the reference, I have attached the screenshot of the console window. I checked "Debug View Hierarchy" option, the UberLogin Button is there but It always remains out of the frame area of View.
I am using IDE : Xcode 7.3.1, Deployment Target : iOS 9.3, Development Language : Swift
Hi, I am using the RideRequestViewController and have realised sometimes, its takes a little bit before the view fully load. Is there other API calls to check for loading progress? I want to be able to show an ActivityIndicator while the view this loading so users don't think the app is frozen. Anyway to do that? Thanks
Hello!
Quick question, the first time I login it gets stuck at login screen printing this error:
Error: access token failed to save to keychain
traced it and here is the part of the code failing:
if !TokenManager.saveToken(accessToken, tokenIdentifier: accessTokenIdentifier, accessGroup: keychainAccessGroup) {
print("Error: access token failed to save to keychain")
}
however if I close the app and open again, works great.
Am I missing something?
I am on the student government at the University of Miami, and would like to learn more about contracting with Uber. We would like to contract a program similar to the University of Southern California's. Please email me at [email protected]
I have integrated an Uber button request with deeplink , when the button is pressed there is a selected state color, is there a way to change the selected state color to clear color , is there a way to get a call back such that the deeplink is triggered
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.