Netmera Developer Guide
Netmera Docs
  • Netmera Developer Guide
  • Platforms
    • iOS
      • New iOS (Swift)
        • SDK Integration
        • Push Notifications
          • Delegate Methods
          • Widget and In-App Messages
          • Media Push
          • Carousel, Slider and Thumbnail Push
        • Deep Linking
          • Custom Deep Links
        • Sound & Vibration
        • Push Inbox
        • Events
        • Geofence & Location
        • User Attributes & Preferences
        • Advertising ID
        • Changelog
      • Former iOS (Objective-C)
        • SDK Integration
        • Push Notifications
          • Delegate Methods
          • Push Payload Receivers
          • Widget and In-App Messages
          • Customizing In-App Messages
          • Media Push
          • Carousel, Slider and Thumbnail Push
          • Custom Web View Presentation
          • Push Icon
        • Live Activities
        • Deep Linking
          • Custom Deep Links
        • Sound & Vibration
        • Push Inbox
        • Events
        • Geofence & Location
        • User Attributes & Preferences
        • Data Transfer
        • Advertising ID
        • SSL Pinning
        • Changelog
    • Android
      • SDK Integration
        • Huawei Integration
        • Huawei Message Receipt
        • Android Integration FAQs
      • Push Notifications
        • Widget and In-App Messages
        • Push Callbacks
        • Custom Web View Presentation
        • Push Icon
      • Deep Linking
        • Custom Deep Links
      • Sound & Vibration
      • Push Inbox
      • Events
      • Geofence & Location
        • Background Location Permission
      • User & Attributes
      • Data Transfer
      • Advertising ID
      • App Tracking
      • SSL Pinning
      • Changelog
    • Web
      • SDK Setup
        • Self-Hosted SDK Setup
      • Mobile Web Push for iOS
      • Deep Linking
        • Custom Deep Links
      • Events
      • User & Attributes
    • React Native
      • SDK Integration
      • Push Notifications
        • Widget and In-App Messages
        • Push Callbacks
      • Deep Linking
        • Custom Deep Links
      • Sound & Vibration
      • Push Inbox
      • Events
      • Geofence & Location
      • User & Attributes
      • Changelog
    • Flutter
      • SDK Integration
      • Push Notifications
        • Push Notification Permissions
        • Widget and In-App Messages
        • Flutter iOS Media Push
      • Deep Linking
        • Custom Deep Links
      • Sound & Vibration
      • Push Inbox
      • Events
      • Geofence & Location
      • User & Attributes
      • SSL Pinning
      • Changelog
    • Cordova
      • SDK Integration
      • Push Notifications
      • Sound & Vibration
      • Push Inbox
      • Events
      • User & Attributes
    • Unity
      • SDK Integration
      • Sound & Vibration
      • Events
      • User & Attributes
      • Changelog
  • Integrated Modules
    • Optimove
    • Adjust
    • Mixpanel
    • IYS Integration
    • VIA Integration
      • Short URL Consent Requests
      • OTP Consent Requests
        • OTP Confirmation Completion
      • VIA Email Rejection Link Generation
      • ETK Rejection via SMS
  • API Documentation
    • REST API
      • Setup
      • Notifications
      • Events
      • User & Device Management
      • Inbox Feature
      • GDPR
      • Error Responses
  • FAQs
    • Push Notifications FAQs
Powered by GitBook
On this page
  • Location Overview
  • Step 1: Enable Location History
  • Step 2: Configure Location Permissions
  • Step 3: Request Location Authorization
  • Step 4: Configure Geofence Region Limits

Was this helpful?

  1. Platforms
  2. iOS
  3. Former iOS (Objective-C)

Geofence & Location

Location Overview

By default, Netmera SDK does not collect location information from the device. To use features like geofence messaging and location-based user targeting, you must enable location tracking.

Step 1: Enable Location History

To use location-based targeting, enable Location History in the Netmera web panel: Developers > App Info > App Config > Location History Enabled

Step 2: Configure Location Permissions

Add the necessary authorization keys to your Info.plist file:

  1. For Geofence Messaging (iOS 10 and earlier)

  • Set NSLocationAlwaysUsageDescription with a description explaining why the app uses region monitoring.

  • This allows the SDK to monitor region entry/exit actions for geofence regions configured in the Netmera Dashboard.

  1. For Geofence Messaging (iOS 11 and later)

  • Set NSLocationAlwaysAndWhenInUseUsageDescription with a description explaining why the app uses region monitoring.

  • This allows the SDK to monitor region entry/exit actions for geofence regions configured in the Netmera Dashboard.

  1. For Occasional Location Updates

  • Set NSLocationWhenInUseUsageDescription with a description.

  • This sends the most recent location once per session.

Step 3: Request Location Authorization

Calling these methods immediately prompts the location permission dialog. Make sure to inform users beforehand about how your application will use their location.

// Request location authorization
Netmera.requestLocationAuthorization()
// Request location authorization
[Netmera requestLocationAuthorization];

Step 4: Configure Geofence Region Limits

To set the maximum number of active geofence regions, use:

Netmera.setNetmeraMaxActiveRegions(20) // Default is 20
[Netmera setNetmeraMaxActiveRegions:20]; // Default is 20

If the value is set greater than 20 or less than 0, it will be automatically reset to 20.

PreviousEventsNextUser Attributes & Preferences

Last updated 2 months ago

Was this helpful?