HereSDKDemandManager
@interface HereSDKDemandManager : NSObject
A factory class for HereSDKDemandClient.
-
Returns the shared demand manager.
Declaration
Objective-C
@property (readonly, nonatomic, class) HereSDKDemandManager *_Nonnull sharedManager;Swift
class var shared: HereSDKDemandManager { get } -
Returns the current HERE SDK version.
Declaration
Objective-C
@property (readonly, nonatomic, class) NSString *_Nonnull version; -
An object conforming to the HereSDKDemandRidesUpdatesDelegate method that receives messages related to the open rides updates.
Declaration
Objective-C
@property (readonly, nonatomic) id<HereSDKDemandRidesUpdatesDelegate> _Nullable ridesUpdatesDelegate;Swift
weak var ridesUpdatesDelegate: HereSDKDemandRidesUpdatesDelegate? { get } -
Starts monitoring all open rides. Rides monitoring is only possible, if the phone number is verified. This can be checked by calling
[HereSDKManager.sharedManager isVerified]. If monitoring is not possible, the delegate methoddidReceiveUpdateError:will be called.Declaration
Objective-C
- (void)registerForRidesUpdatesWithDelegate: (nonnull id<HereSDKDemandRidesUpdatesDelegate>)delegate;Swift
func registerForRidesUpdates(with delegate: HereSDKDemandRidesUpdatesDelegate)Parameters
delegateThe delegate that will receive ride updates.
-
Stops monitoring open rides
Declaration
Objective-C
- (void)unregisterForRidesUpdates;Swift
func unregisterForRidesUpdates() -
Starts monitoring a ride. Ride monitoring is only possible, if the phone number is verified. This can be checked by calling
[HereSDKManager.sharedManager isVerified]. If monitoring is not possible, the handler will be called with phone verification error.Declaration
Objective-C
- (void)registerUpdatesForRide:(nonnull NSString *)rideId withHandler:(nonnull HereSDKDemandRideUpdateBlock)handler;Swift
func registerUpdates(forRide rideId: String, withHandler handler: @escaping HereSDKDemandRideUpdateBlock)Parameters
rideIdThe ride’s identifier.
handlerThe handler for receiving updates.
-
Stops monitoring a ride
Declaration
Objective-C
- (void)unregisterUpdatesForRide:(nonnull NSString *)rideId;Swift
func unregisterUpdates(forRide rideId: String)Parameters
rideIdThe ride’s identifier.
-
Request ride offers that match a given request.
Note
Can return
HereSDKDemandClientErrorfor request related errors, orHereSDKNetworkErrorandHereSDKAuthErrorfor network or authentication errors:HereSDKDemandClientErrorInternalWhen the request parameter was invalid.HereSDKDemandClientErrorInvalidCoordinateInvalid coordinate values for pickup or destination locations.HereSDKDemandClientErrorInvalidDateInvalid prebook pickup time.HereSDKDemandClientErrorInvalidMaxWalkingDistancePublicTransportInvalid maximum walking distance in transit options.HereSDKDemandClientErrorInvalidMaxTransfersPublicTransportInvalid max transfers value in transit options.HereSDKNetworkErrorNotAvailableHereSDKNetworkErrorAuthExpiredHereSDKAuthenticationError
Declaration
Objective-C
- (void)requestRide:(nonnull HereSDKDemandRideOffersRequest *)request withHandler:(nonnull void (^)( NSArray<id<HereSDKDemandRideOfferProtocol>> *_Nullable, NSError *_Nullable))handler;Swift
func requestRide(_ request: HereSDKDemandRideOffersRequest, withHandler handler: @escaping ([HereSDKDemandRideOfferProtocol]?, Error?) -> Void)Parameters
requestThe
HereSDKDemandRideOffersRequestobject containing the ride constraints (e.g. numbers of passengers and suitcases).handlerThe block that will handle the response, with an array of offers, if successful, or an error, if an error has occurred.
-
Create a new ride object with the given offer ID.
Warning
Requires the user to be verified. Use
HereSDKManager.sharedManager.isUserVerifiedto check verification status.Note
Can return
HereSDKDemandClientErrorfor request related errors, orHereSDKNetworkErrorandHereSDKAuthErrorfor network or authentication errors:HereSDKDemandClientErrorInternalWhen the request parameter was invalid.HereSDKDemandClientErrorOfferExpiredThe requested offer has expired.HereSDKNetworkErrorNotAvailableHereSDKNetworkErrorPhoneNotVerifiedHereSDKAuthenticationError
Declaration
Objective-C
- (void)createRideWithRequest:(nonnull HereSDKDemandRideRequest *)request withHandler:(nonnull void (^)(HereSDKDemandRide *_Nullable, NSError *_Nullable))handler;Swift
func createRide(with request: HereSDKDemandRideRequest, withHandler handler: @escaping (HereSDKDemandRide?, Error?) -> Void)Parameters
requestThe
HereSDKDemandRideRequestobject containing the offerId.handlerThe block that will handle the response, with a ride object, if successful, or an error, if an error has occurred.
-
Query for rides with the given statuses and update time.
Warning
Requires the user to be verified. Use
HereSDKManager.sharedManager.isUserVerifiedto check verification status.Note
Can return
HereSDKDemandClientErrorfor request related errors, orHereSDKNetworkErrorandHereSDKAuthErrorfor network or authentication errors:HereSDKDemandClientErrorInternalWhen the request parameter was invalid.HereSDKNetworkErrorNotAvailableHereSDKNetworkErrorPhoneNotVerifiedHereSDKAuthenticationError
Declaration
Objective-C
- (void)getRides:(nonnull HereSDKDemandRideQuery *)query withHandler:(nonnull void (^)(HereSDKDemandQueryRidesResponse *_Nullable, NSError *_Nullable))handler;Swift
func getRides(_ query: HereSDKDemandRideQuery, withHandler handler: @escaping (HereSDKDemandQueryRidesResponse?, Error?) -> Void)Parameters
queryThe HereSDKDemandRideQuery object containing the filters on ride statuses and update time.
handlerThe block that will handle the response, with a rides response, if successful, or an error, if an error has occurred.
-
Cancel a ride related to a given request.
Warning
Requires the user to be verified. Use
HereSDKManager.sharedManager.isUserVerifiedto check verification status.Note
Can return
HereSDKDemandClientErrorfor request related errors, orHereSDKNetworkErrorandHereSDKAuthErrorfor network or authentication errors:HereSDKDemandClientErrorInternalWhen the request parameter was invalid.HereSDKNetworkErrorNotAvailableHereSDKNetworkErrorPhoneNotVerifiedHereSDKAuthenticationError
Declaration
Objective-C
- (void)cancelRideWithRequest:(nonnull HereSDKDemandCancelRideRequest *)request withHandler: (nonnull HereSDKDemandRideCancellationBlock)handler;Swift
func cancelRide(with request: HereSDKDemandCancelRideRequest, withHandler handler: @escaping HereSDKDemandRideCancellationBlock)Parameters
requestThe HereSDKDemandCancelRideRequest object representing the ride to be cancelled.
handlerThe block that will handle the response, with cancellation info, if successful, or an error, if an error has occurred.
-
Get a ride by rideId.
Warning
Requires the user to be verified. Use
HereSDKManager.sharedManager.isUserVerifiedto check verification status.Note
Can return
HereSDKDemandClientErrorfor request related errors, orHereSDKNetworkErrorandHereSDKAuthErrorfor network or authentication errors:HereSDKDemandClientErrorInternalWhen the rideId parameter was invalid.HereSDKNetworkErrorNotAvailableHereSDKNetworkErrorPhoneNotVerifiedHereSDKAuthenticationError
Declaration
Objective-C
- (void)getRideWithRequest:(nonnull NSString *)rideId withHandler:(nonnull void (^)(HereSDKDemandRide *_Nullable, NSError *_Nullable))handler;Swift
func getRideWithRequest(_ rideId: String, withHandler handler: @escaping (HereSDKDemandRide?, Error?) -> Void)Parameters
rideIdThe ID of the ride to retrieve.
handlerThe block that will handle the response, with a ride object, if successful, or an error, if an error has occurred.
-
Get ride payment information for a specific ride.
Warning
Requires the user to be verified. Use
HereSDKManager.sharedManager.isUserVerifiedto check verification status.Note
Can return
HereSDKDemandClientErrorfor request related errors, orHereSDKNetworkErrorandHereSDKAuthErrorfor network or authentication errors:HereSDKDemandClientErrorInternalWhen the rideId parameter was invalid.HereSDKNetworkErrorNotAvailableHereSDKNetworkErrorPhoneNotVerifiedHereSDKAuthenticationError
Declaration
Objective-C
- (void)getRidePaymentForRideId:(nonnull NSString *)rideId withHandler: (nonnull void (^)(HereSDKDemandRidePayment *_Nullable, NSError *_Nullable))handler;Swift
func getRidePayment(forRideId rideId: String, withHandler handler: @escaping (HereSDKDemandRidePayment?, Error?) -> Void)Parameters
rideIdThe ID of the ride to retrieve.
handlerThe block that will handle the response, with a ride payment object, if successful or an error, if an error has occurred.
-
Get the verticals coverage available around a specific location This request will return a mask of all available TransitTypes around the given location.
Note
Can return
HereSDKDemandClientErrorfor request related errors, orHereSDKNetworkErrorandHereSDKAuthErrorfor network or authentication errors:HereSDKDemandClientErrorInternalWhen the request parameter was invalid.HereSDKDemandClientErrorInvalidCoordinateInvalid coordinate values.HereSDKNetworkErrorNotAvailableHereSDKNetworkErrorAuthExpiredHereSDKAuthenticationError
Declaration
Objective-C
- (void) getVerticalsCoverageWithRequest: (nonnull HereSDKDemandVerticalsCoverageRequest *)request withHandler: (nonnull void (^)( HereSDKDemandVerticalsCoverageResponse *_Nullable, NSError *_Nullable))handler;Swift
func getVerticalsCoverage(with request: HereSDKDemandVerticalsCoverageRequest, withHandler handler: @escaping (HereSDKDemandVerticalsCoverageResponse?, Error?) -> Void)Parameters
requestThe HereSDKDemandVerticalsCoverageRequest object.
handlerThe block that will handle the response, , with a coverage response, if successful, or an error, if an error has occurred.
HereSDKDemandManager Class Reference