API Reference
Log In

Mute notifications

If for any reason you want to mute the MOCA generated notifications (for example by adding a switch within your application settings). Call the following method

MOCA.muteNotifications(true)
[MOCA muteNotifications:YES];

This setting is persisted between app restarts. In order to restore the SDK to its normal state, call the same method with a false / NO argument.

In order to check the status of this setting, call:

MOCA.areNotificationsMuted()
[MOCA areNotificationsMuted];

Geofence and beacon detection

Call the following method with the correct argument in order to enable or disable geofences and bluetooth beacon detection.

  • true/`YES: Enables the feature.
  • false/`NO: Disables the feature.
    This setting is persisted across app restarts.
MOCA.setProximityEnabled(true)
[MOCA setProximityEnabled:YES]

Geolocation tracking

When disabled, this prevents the SDK from sending user locations for Analytics

  • true/`YES: Enables the feature.
  • false/`NO: Disables the feature.
    This setting is persisted across app restarts.
MOCA.setGeoTrackingEnabled(true)
[MOCA setGeoTrackingEnabled:YES];

Wi-Fi Only data synchronization

When active, this setting prevents the SDK from downloading and uploading data when using cellular data. This is useful if your application

  • true/`YES: Enables the feature.
  • false/`NO: Disables the feature.
    This setting is persisted across app restarts.
MOCA.setWifiOnlyEnabled(true)
[MOCA setWifiOnlyEnabled:YES];