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
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.
![](https://user.netmera.com/~gitbook/image?url=https%3A%2F%2F2578508252-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F0bOAscrXzPSujyzq8DEz%252Fuploads%252FVdPChP0UZA3EHg7a443v%252Funnamed%2520%286%29.png%3Falt%3Dmedia%26token%3Df099eb60-e3bc-4845-9f60-07b1a67b4a8a&width=768&dpr=4&quality=100&sign=669ecbbb&sv=1)
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:
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.
Check Internet Connection:
Verify your device's internet connection to ensure it is stable.
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.
Verify Method Placement:
Confirm that the method is placed at the top of the '
didFinishLaunchingWithOptions
' function within your code.
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
Multiple Concurrent Popups:
If multiple popups are set to display simultaneously, it may lead to issues with popup loading.
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