RegionEvent

@objc(UARegionEvent)
public class RegionEvent : NSObject

A region event captures information regarding a region event for analytics.

  • The region’s identifier.

    Declaration

    Swift

    @objc
    public let regionID: String
  • The source of the event.

    Declaration

    Swift

    @objc
    public let source: String
  • The type of boundary event.

    Declaration

    Swift

    @objc
    public let boundaryEvent: UABoundaryEvent
  • A circular region with a radius, and latitude/longitude from its center.

    Declaration

    Swift

    @objc
    public let circularRegion: CircularRegion?
  • A proximity region with an identifier, major and minor.

    Declaration

    Swift

    @objc
    public let proximityRegion: ProximityRegion?
  • Default constructor.

    Declaration

    Swift

    public init?(
        regionID: String,
        source: String,
        boundaryEvent: UABoundaryEvent,
        circularRegion: CircularRegion? = nil,
        proximityRegion: ProximityRegion? = nil
    )

    Parameters

    regionID

    The ID of the region.

    source

    The source of the event.

    boundaryEvent

    The type of boundary crossing event.

    circularRegion

    The circular region info.

    proximityRegion

    The proximity region info.

    Return Value

    Region event object or nil if error occurs.

  • Factory method for creating a region event.

    Declaration

    Swift

    @objc(regionEventWithRegionID:source:boundaryEvent:)
    public class func regionEvent(
        regionID: String,
        source: String,
        boundaryEvent: UABoundaryEvent
    ) -> RegionEvent?

    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.

  • Factory method for creating a region event.

    Declaration

    Swift

    @objc(regionEventWithRegionID:source:boundaryEvent:circularRegion:proximityRegion:)
    public class func regionEvent(
        regionID: String,
        source: String,
        boundaryEvent: UABoundaryEvent,
        circularRegion: CircularRegion?,
        proximityRegion: ProximityRegion?
    ) -> RegionEvent?

    Parameters

    regionID

    The ID of the region.

    source

    The source of the event.

    boundaryEvent

    The type of boundary crossing event.

    circularRegion

    The circular region info.

    proximityRegion

    The proximity region info.

    Return Value

    Region event object or nil if error occurs.