iOS

This document outlines common errors encountered during iOS SDK implementation, along with their causes and solutions. It aims to help developers troubleshoot issues quickly and ensure seamless integration.

1. Errors in cmpDidError delegate

One of the delegate functions within ChoiceCMPDelegate delegate is cmpDidError which gets fired whenever there’s an issue with the initialisation due to any reason. This function has a parameter: error which contains information about the error occurred.

Here’s a list of error messages that error.localizedDescription with have:

Message Possible Reasons Actions
The data couldn’t be read because it is missing. There’s an issue in the configuration on the portal. Check all the fields are filled and saved properly. Also check if the same bundle identifier is used in the App and on the portal.
Malformed portal configuration URL, check pCode and bundleIdentifier Either PCode or bundle identifier is not correct. Look for any spaces. Make sure the PCode is copied from the portal without the “p-”.
Malformed app-config.json file at NewPremiumUILabels level Some of the key data is missing or incorrect in translations If the issue persists, contact InMobi
It is not known yet if GDPR Applies so this value may be misleading.  Always check `gdprAppliesIsKnown` first If you are using doesGdprApply (in Objc) before initialisation, you may encounter this error. Check if the initialisation is done by implementing the cmpDidLoad delegate and then check this value.
Unsupported language The selected language or device language is not supported. If the issue persists, contact InMobi
Could not find rootView controller. Make sure your rootViewController is attached to a keywindow before starting CMP CMP couldn’t find the ViewController. Make sure the SDK is properly setup and configured before initialisation.
CMP has not loaded yet, run startChoice with the pCode first. ForceDisplayUI is called before initialisation. Wait for the cmpDidLoad callback before calling the API
US Regulation is not configured in the portal showUSRegulations has been called but CCPA / MSPA not configured properly on the portal Make sure the configurations are correct from the portal
CCPA is not configured in the portal. ShowCCPA is called but not configured from the portal Make sure CCPA is configured properly from the portal
Could not find rootView controller. Make sure your rootViewController is attached to a keywindow before starting CCPA CMP couldn’t find the ViewController. Make sure the SDK is properly setup and configured before initialisation.
Could not find rootView controller. Make sure your rootViewController is attached to a keywindow before showing Google Basic Consent CMP couldn’t find the ViewController. Make sure the SDK is properly setup and configured before initialisation.
Color named: {key} is malformed with value: {color string provided}.  Color must start with #") The colour string value provided during the initialisation is incorrect. Check for all the provided colour values on initialisation. The colour values string must start with “#” character followed by three or six digits colour code.
Could not find MSPA Viewcontroller CMP couldn’t find the ViewController. Make sure the SDK is properly setup and configured before initialisation.

 2. Errors that appear in console

Debug and Error Logs are logged in console in order to track any misbehaviour or errors in SDK. Here's a list of Error Logs and their description:

Message Possible Reasons Actions
Error encoding the object Internal system behaviour related log caused due to data encoding failure Report to InMobi
MSPA Jurisdiction not found Missing values in configuration file Check the MSPA related values in the portal and save properly.
Region not found Missing values in configuration file Check the network connection and if the issue still persists, report to InMobi
Error loading iabgpp Internal error in GPP encoding Report to InMobi
Failed to decode GoogleVendor data Invalid google vendor format encountered while retrieving from storage. If occurred during testing, reinstall the app and if the issue persists, report to InMobi
Could not find the geo location One of the internal configurations failed to download Check the network connection and try again
Error downloading GVL version. Using Cache Global vendor list failed to download. Check the network connection and try again. If the issue still persists, contact InMobi
Error decoding global vendor list There’s some inconsistencies with the newly downloaded GVL Report to InMobi
No locations found Missing values in configuration file Check the MSPA related values in the portal and save properly.
Current geo location not found One of the internal configurations failed to download Check the network connection and try again
Failed to load custom font There’s some issue when using the custom font provided during the initialisation. Check if the font is properly added to the bundle and in Info.plist as per the Apple documentation. Also check if the correct font name is passed in the initialisation

On This Page

Last Updated on: 20 Jan, 2025