Enable/Disable Widget and In App Messages

When a pop-up notification or an in app message is received by the SDK, it immediately presents the corresponding web view content if the application is in foreground state. If application is in background state when pop-up is received, SDK presents the web view content whenever application comes to foreground state.

You may want to disable this immediate presentation behavior for cases like when your users watch a video, when they are in the middle of their favorite game level, or when they are about to finish purchasing their order. You use the following two methods to manage this process:

Enable / Disable Pop-ups

// Call this method to disable immediate popup presentation
Netmera.setEnabledPopupPresentation(false)

// Call this method to re-enable immediate popup presentation
Netmera.setEnabledPopupPresentation(true)

In order to use in app messages, you should integrate the SDK version 3.4.0 or higher. Popups and In App messages are enabled by default.

If you want to receive popups or in app messages while application is in background, you should enable Remote Notifications at Background Modes from Capabilities.

If a pop-up is received when pop-up presentation is disabled by your code, SDK will store it, and present whenever pop-up presentation is re-enabled. If multiple pop-up notifications are received during that period, SDK stores the most recent notification, and present only that one.

Warning:

Device cannot receive pop-ups or in app messages while application is closed and killed while low battery mode is on because low battery mode disables background application refresh mode.

Troubleshooting

Widget / In App Issues

If you are experiencing difficulties in receiving popups, please follow these troubleshooting steps:

  1. Increase Session Duration:

    • Navigate to the initial panel.

    • Under Developer > App Info find the App Config section.

    • Increase the value in the 'Session Expire Interval' field by 1.

    • Click the 'Apply' button to save the changes.

    • Retry the popup.

  2. Check Internet Connection:

    • Verify your device's internet connection to ensure it is stable.

  3. Check for Other False Settings:

    • Examine your project to ensure that no other parts of your code are setting values to 'false' that might affect popup functionality.

  4. Verify Method Placement:

    • Confirm that the method is placed at the top of the 'didFinishLaunchingWithOptions' function within your code.

    swiftCopy codeif #available(iOS 10.0, *) {
        UNUserNotificationCenter.current().delegate = self as? UNUserNotificationCenterDelegate
    } else {
        // Fallback on earlier versions
    }
  5. Check for Third-Party Tool Integration:

    • Ensure that Netmera is initialized at the top of your project if any third-party tools are integrated.

Additional Warnings

  1. Multiple Concurrent Popups:

    • If multiple popups are set to display simultaneously, it may lead to issues with popup loading.

  2. Low Device Storage:

    • Note that if the device's storage is nearly full, popups may not load correctly.

These troubleshooting steps should help you diagnose and resolve any issues related to popup functionality.

Last updated