Open sujeshraveendran opened 7 years ago
That's interesting. I'll have to look into this more. Can you please confirm that the Uber Application owner is the same as what you're using inside your own app? You can check the "Developers" tab in the admin console.
Yes ! Both are same! Tried to login with different developer too.
Did you get any solution ?
Privileged scopes not accessible. The API documentation states that "During development, your account and any five developer accounts you list on the dashboard will be able to authorize these [privileged] scopes without whitelisting." But here i'm unable to use the "request" scope in sanbox and production with UBER SDK loginManager class. I tried all the three options .native .implicit and .authorizationCode on loginManager (let loginManager = LoginManager(loginType: .native). #1 When i try with .native and .authorizationCode i'm getting "An Unknown Error Occured" message ie error is NIL object . when i try with .implicit i'm getting "Server was unable to understand your request" (error NSError? domain: "com.uber.rides-ios-sdk.ridesAuthenticationError" - code: 13 0x0000600000448700). When i remove .request scope and getting accessToken as expected but when i try to call riderequest( ridesClient.requestRide) with this bearerToken i'm getting error status code 401 (title String? "This endpoint requires at least one of the following scopes: request.delegate.tosaccept, request, request.delegate" some). `` // LoginManager login function @IBAction func login( sender: AnyObject) { // Define which scopes we're requesting // Need to be authorized on your developer dashboard at developer.uber.com let requestedScopes = [RidesScope.profile, RidesScope.request] // Use your loginManager to login with the requested scopes, viewcontroller to present over, and completion block let loginManager = LoginManager(loginType: .native)
} // **** ridesClient.requestRide function**** func requestRide() {
// self.requestButton.isEnabled = false let pickupLocation = CLLocation(latitude: 10.0080, longitude: 76.3623) let dropoffLocation = CLLocation(latitude: 10.0159, longitude: 76.3419) // let pickupLocation = CLLocation(latitude: 37.787654, longitude: -122.402760) // let dropoffLocation = CLLocation(latitude: 37.775200, longitude: -122.417587)
// builder.productID = "a1111c8c-c720-46c3-8534-2fcdd730040d"
}