Skip to main content

Overview

The RadarStatus enum represents the status of a Radar SDK request. It is returned in completion handlers and delegate methods to indicate whether a request succeeded or failed, and if it failed, why.

Enum Declaration

Cases

success

Success.

errorPublishableKey

SDK not initialized. Call Radar.initialize(publishableKey:) before making any other SDK calls.

errorPermissions

Location permissions not granted. Request location permissions from the user before calling location-based methods.

errorLocation

Location services error or timeout (20 seconds). This may occur if:
  • Location services are disabled
  • The device cannot determine its location
  • The location request timed out

errorBluetooth

Bluetooth (beacon ranging) error or timeout (5 seconds). This occurs when:
  • Bluetooth is disabled
  • Beacon ranging is not available
  • The beacon ranging request timed out

errorNetwork

Network error or timeout (10 seconds). This may occur if:
  • The device has no network connectivity
  • The network request timed out
  • There was a network communication error

errorBadRequest

Bad request (missing or invalid parameters). Check that all required parameters are provided and valid.

errorUnauthorized

Unauthorized (invalid API key). Verify that your publishable key is correct and valid.

errorPaymentRequired

Payment required. This occurs when:
  • Your organization is disabled
  • Your usage has exceeded your plan limits

errorForbidden

Forbidden. This occurs when:
  • Your account has insufficient permissions
  • You don’t have beta access to a feature

errorNotFound

Not found. The requested resource was not found.

errorPlugin

Missing plugin. A required plugin or framework is not available.

errorRateLimit

Too many requests (rate limit exceeded). Reduce the frequency of your API calls.

errorServer

Internal server error. Try the request again. If the problem persists, contact support.

errorUnknown

Unknown error. An unexpected error occurred.

Helper Method

stringForStatus(_:)

Returns a human-readable display string for a status value.

Usage Examples

Swift

Objective-C

Handling Errors in RadarDelegate

Common Status Handling Patterns

Retry Logic

Permission Checking

See Also