ios - How can I receive update status(data) when I request ride with UBSDKRideRequestViewController (Uber SDK) -
i have added uber sdk in application. didn't request project request full access
. it's on development. , have issues can't find answer (i'm using sandbox
mode.)
q. need test. if requested , driver accepted. how can know time arrive or other status e.g.arrived
. , how can send notification user in application when driver arrived. see ubsdkriderequestviewcontrollerdelegate
response error case.
this's code.
ubsdkrideparametersbuilder *builder = [[ubsdkrideparametersbuilder alloc] init]; [builder setpickuptocurrentlocation]; [builder setdropofflocation:dropofflocation]; ubsdkrideparameters *parameters = [builder build]; nsarray<ubsdkridesscope *> *scopes = @[ubsdkridesscope.ridewidgets,ubsdkridesscope.profile,ubsdkridesscope.request]; ubsdkloginmanager *loginmanager = [[ubsdkloginmanager alloc] init]; ubsdkriderequestviewcontroller *vc = [[ubsdkriderequestviewcontroller alloc] initwithrideparameters:parameters loginmanager:loginmanager]; vc.title = @"uber"; vc.delegate = self;
please advice thanks.
currently, ride request widget not provide notifications changes in trip status. can, however, status of current trip using ridesclient
, calling fetchcurrentride
give details current trip. in order access trips widget on endpoint, however, need all_trips
scope. require handle login separately riderequestviewcontroller. can use loginbutton or loginmanager request alltrips
, ridewidgets
ridesscopes
in terms of testing, can update status of sandbox trip making put request /v1/sandbox/requests/{request_id}
endpoint json body in form {"status": "accepted"}
(replacing status want see). status change reflected in app. can find more information on sandbox on uber developer site
Comments
Post a Comment