Kumar, Anish

This document details the process of troubleshooting MAP SDK with your iOS application.

 

MAP SDK iOS

 

  1. Check the API Key/ License used in the app, also verify it on the portalAPI key
  2. Remove any Empty space in API Key/ License
  3. Verify the structure of API Key/ License :akamai init map
  4. Config received in app - If config is not received then API Key/ License is not entered correctly.
  5. If Custom URLSession is used for network requests then interceptor needs to be added: [[AkaCommon shared] interceptSessionsWithConfiguration:sessionConfig];
  6. Check for third party framework used for network and image calls, interceptors will be required for these.
  7. Check Akamai headers are added in request by running the app through Charles Proxy, if Akamai headers are not added to the request, then interceptor needs to be added for network/ image request.Below is Sample request showing Akamai header:

     

    API key

  8. To gather more debug logs, enable debug logs in code:

     

    • [AkaCommon shared].debugConsoleEnabled = true;
  9. Prepositioning is not working:
    • Check the segments on Luna Portal
    • Verify if Firebase is configured
    • Verify if Firebase code is added
    • Debug print manifest and cached content:
    • [[AkaMap shared] printCache];
  10. Check the segments on Luna PortalAPI key

 

 

Corner Cases :

 

 

  1. Caching failing

     

    • Check the cache control header are valid
    • Check the vary header - "vary" header is present in the response headers with "user-agent" in it - which indicates to the SDK that the content should only be cached based on user-agent - this is a little ambiguous which causes the SDK to play it safe and avoid caching since we don't want to cache an item that was intended for desktop on mobile usually the vary header just has Accept-Encoding. So to avoid this we need "vary" header to just have "Accept-Encoding”.akamai init
    • Universal Cache feature has a limitation of 1MB for the cached content on the device (based on documentation). What happens when the content exceeds the limit? SDK overwrite this with new cached content or does it stop caching at that point? That’s per item. No individual item more than 1MB will be cached The total cache size is much bigger (default like 3GB , if space is available.) There is also a purge mechanism internally to keep it contained as well.Total cache size (UC + Pre-positioned) – default to 3gb – can be changed using
    • VocConfigBuilder.prefetchLimit
    • For Pre-positioned content – u can control that using
    • VocConfigBuilder.individualFileLimit
    • - defaulted to 100 M
  2. Requests are not refreshing (Eg : In flight booking every time fresh content should be served)

     

    • Check the CacheControl max age is 0, so that the contents are not cached.
  3. Reports not available

     

    • Check in the SDK logs, if SDK is initialized successfully.
  4. Config is not applied

     

    • When config is not applied to SDK, none of the functionality will work for the SDK, so it's important that config is applied. Check the License, Package name/Bundle Identifier in code is the same as on portal and also check for empty spaces.
    • Without doing any changes click on the Save Changes button on Luna Portal.