By default we have disabled logs from the SDK. For debugging if you want to see the SDK logs in your console, use debug method as shown below :
Setting debug level to LOG_ALL will show all the logs from the SDK. If you want to see only the exceptions, you can set log level to LOG_EXCEPTIONS.
All MoEngage logs are prefixed by the keyword "MoEngage".
Refer to this Sample Project if you have any queries regarding implementation of any features of MoEngage iOS SDK.
- Make sure that the SDK initialization is done properly. Check if the App ID provided in the intialization method is correct.
- Once the App ID is checked, make sure you are checking in the right Moengage environment. While initialization of the SDK, you must make use of the DEBUG macro in your project. By default behaviour, if the build configuration is set to Debug then events will show up in Test Environment or else if build configuration is set to Release then events will be tracked in Live Environment.
- In the SDK we reject events with invalid event-attributes. Event attribute values can only have Strings, Numbers and dictionaries or else events might get rejected. For confirming enable the SDK logs and check if the events list sent while app goes to background has the event you are tracking, if not then events are getting rejected by the SDK.
- If using SDK Version below 3.3.0, ensure that you have added life cycle methods in your app delegate.
- If neither of the above then sometimes it takes a little time to show up in the dashboard, so wait for about 10-15 mins for the events to show up. :)
- Make sure you have implemented user unique ID tracking properly. Please set User Attribute Unique ID unique to your logged in users, don't hardcode this value.
- Make sure resetUser method is called on logout feature of the App, so that SDK can differentiate between the users.
- Make sure device is connected to the internet.
- Make sure that Push Entitlement is added to the project.
- Ensure you registered your app for push notifications correctly, check if you are getting the device token while trying to register for Remote Notification, and the same is sent to the SDK correctly.
- Verify uploaded APNS Certificate:
First, Verify that your APNS Certificate(PEM file) is correct. Keep handy the certificate and the key pem files. Open the terminal and test it using the following command —>
openssl s_client -connect gateway.sandbox.push.apple.com:2195 -cert “Certificate_name”.pem -key “Certificate_key”.pem
Here, replace the "Certificate_name" and "Certificate_key" with your certificate and key files. The quotes are not needed.
Use the password which you used for converting the p12 to pem.
If you get the status CONNECTED(00000003) , and the master key in the end, then the PEM is fine. Else, ensure that you have the correct PEM. If problems still persist, please contact the MoEngage team.
- The dashboard says notification sent, but the device didn’t receive it - Check if notification settings for the app were disabled.
- Sometimes it takes upto 30 mins for the APNS to deliver a push, just wait for sometime to confirm receiving of push notification.
- Ensure that you are calling MoEngage SDK methods in callback methods which are called on receiving remote notifications. Refer link to know more.
- If Http link : Http URL's aren't supported in iOS9 and above unless explicitly specified in the plist. You will have include App Transport Security Settings Dictionary in your Info.plist and inside this set Allow Arbitrary Loads to YES.
- Check if the Rich Landing URL is valid.
- Make sure you have implemented the Rich Notification feature correctly.
- If Http link : Http URL's aren't supported in iOS9 and above unless explicitly specified in the plist. You will have include App Transport Security Settings Dictionary in your Notification Service Extensions Info.plist and inside this set Allow Arbitrary Loads to YES.
- Check if the Image/Audio/Video URL is valid.
- SDK doesn't get the callback on receiving the push notification, unless it's clicked. If you also want to show unclicked notifications in Inbox then contact MoEngage Team for enabling this feature from our backend.
- MoEngage iOS SDK doesn't track screen Names in your app. The possible values for screenName parameter is something which has to be defined by developers in project. Therefore, there will be no dropdown incase of iOS and the Screen name value has to be entered by the marketer in the text-field while creating the campaign. MoEngage will provide the entered value in the notification payload. Developer will have to implement the part to parse and get screenName parameter's value and to navigate to the mentioned screen. Refer link to get the notification payload structure.
- Make sure handleInAppMessage method is called wherever, inApp has to be shown - link
- In-App only came once and can’t see/test it again. Then it might be a case where inApp to be shown may not pass set of rules which we have kept in SDK to make sure user's experience isn't hindered. Refer link to know about these rules.
- Enable SDK logs to get more details on why inApp didn't show up and share it with MoEngage Team.
Very recently you would have started getting this warning mail from Apple on uploading the build to AppStore. This mail informs about a restriction which will be applied by Apple starting from Spring 2019, this mail is a way for Apple to inform developers about this restriction which will be applied on the Apps in future. Please note that this in no way will affect the Apps Review process, you will still be able to release the App.
As a fix for this issue we have separated SDK's Geofence module to MOGeofence from MoEngage-iOS-SDK version 4.3.0 and going forward has to be integrated separately to a project. Also because of this, there are few changes in the implementation of geofence campaigns. Please follow the docs here to know more.