RadarDelegate

Objective-C

@protocol RadarDelegate <NSObject>

Swift

protocol RadarDelegate : NSObjectProtocol

A delegate for client-side delivery of events, location updates, and debug logs. For more information, see https://radar.com/documentation/sdk/ios

  • Tells the delegate that events were received.

    Declaration

    Objective-C

    - (void)didReceiveEvents:(NSArray<RadarEvent *> *_Nonnull)events
                        user:(RadarUser *_Nullable)user;

    Swift

    func didReceiveEvents(_ events: [RadarEvent], user: RadarUser?)

    Parameters

    events

    The events received.

    user

    The user, if any.

  • Tells the delegate that the current user’s location was updated and synced to the server.

    Declaration

    Objective-C

    - (void)didUpdateLocation:(CLLocation *_Nonnull)location
                         user:(RadarUser *_Nonnull)user;

    Swift

    func didUpdateLocation(_ location: CLLocation, user: RadarUser)

    Parameters

    location

    The location.

    user

    The current user.

  • Tells the delegate that the client’s location was updated but not necessarily synced to the server. To receive only server-synced location updates and user state, use didUpdateLocation:user: instead.

    Declaration

    Objective-C

    - (void)didUpdateClientLocation:(CLLocation *_Nonnull)location
                            stopped:(BOOL)stopped
                             source:(RadarLocationSource)source;

    Swift

    func didUpdateClientLocation(_ location: CLLocation, stopped: Bool, source: RadarLocationSource)

    Parameters

    location

    The location.

    stopped

    A boolean indicating whether the client is stopped.

    source

    The source of the location.

  • Tells the delegate that a request failed.

    Declaration

    Objective-C

    - (void)didFailWithStatus:(RadarStatus)status;

    Swift

    func didFail(status: RadarStatus)

    Parameters

    status

    The status.

  • Tells the delegate that a debug log message was received.

    Declaration

    Objective-C

    - (void)didLogMessage:(NSString *_Nonnull)message;

    Swift

    func didLog(message: String)

    Parameters

    message

    The message.