UARegionEvent

Objective-C

@interface UARegionEvent : UAEvent

Swift

class UARegionEvent : UAEvent

A UARegion event captures information regarding a region event for UAAnalytics.

Region Event Properties

  • A proximity region with an identifier, major and minor.

    Declaration

    Objective-C

    @property (nonatomic, strong, nullable) UAProximityRegion *proximityRegion;

    Swift

    var proximityRegion: UAProximityRegion? { get set }
  • A circular region with a radius, and latitude/longitude from its center.

    Declaration

    Objective-C

    @property (nonatomic, strong, nullable) UACircularRegion *circularRegion;

    Swift

    var circularRegion: UACircularRegion? { get set }
  • The type of boundary event - enter, exit or unknown.

    Declaration

    Objective-C

    @property (nonatomic, readonly) UABoundaryEvent boundaryEvent;

    Swift

    var boundaryEvent: UABoundaryEvent { get }
  • The source of the event.

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSString *_Nonnull source;

    Swift

    var source: String { get }
  • The region’s identifier.

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSString *_Nonnull regionID;

    Swift

    var regionID: String { get }
  • The event’s JSON payload.

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSDictionary *_Nonnull payload;

    Swift

    var payload: [AnyHashable : Any] { get }

Region Event Factory

  • Factory method for creating a region event.

    Declaration

    Objective-C

    + (nullable instancetype)regionEventWithRegionID:(nonnull NSString *)regionID
                                              source:(nonnull NSString *)source
                                       boundaryEvent:(UABoundaryEvent)boundaryEvent;

    Swift

    convenience init?(regionID: String, source: String, boundaryEvent: UABoundaryEvent)

    Parameters

    regionID

    The ID of the region.

    source

    The source of the event.

    boundaryEvent

    The type of boundary crossing event.

    Return Value

    Region event object or nil if error occurs.