Error when trying to display map with Maps SDK for iOS, v0.2.1538

Getting this error in Xcode upon running:
2022-07-18T03:31:03.290Z [error] native-mapdisplay-engine: NKTMap.mm:840: true
2022-07-18T03:31:05.122Z [warning] mapdisplay.clientlib.Style: StyleParser.cpp:2098: The style file is outdated. It contains no version. Supported version is 2. Use update_tomtom_style_file.py script to update it.
2022-07-18 09:01:07.725796+0530 Routespunkt Hiking Grid Diary[67494:5402124] Metal API Validation Enabled
2022-07-18T03:31:08.576Z [info] MapCL.Graphics.Metal: Capabilities.mm:29: Metal device name: Apple A12 GPU
2022-07-18T03:31:08.576Z [info] MapCL.Graphics.Metal: Capabilities.mm:90: Supported Feature Sets
2022-07-18T03:31:08.576Z [info] MapCL.Graphics.Metal: Capabilities.mm:94: MTLFeatureSet_iOS_GPUFamily1_v1 YES
2022-07-18T03:31:08.576Z [info] MapCL.Graphics.Metal: Capabilities.mm:94: MTLFeatureSet_iOS_GPUFamily1_v2 YES
2022-07-18T03:31:08.576Z [info] MapCL.Graphics.Metal: Capabilities.mm:94: MTLFeatureSet_iOS_GPUFamily1_v3 YES
2022-07-18T03:31:08.576Z [info] MapCL.Graphics.Metal: Capabilities.mm:94: MTLFeatureSet_iOS_GPUFamily1_v4 YES
2022-07-18T03:31:08.576Z [info] MapCL.Graphics.Metal: Capabilities.mm:94: MTLFeatureSet_iOS_GPUFamily1_v5 YES
2022-07-18T03:31:08.576Z [info] MapCL.Graphics.Metal: Capabilities.mm:94: MTLFeatureSet_iOS_GPUFamily2_v1 YES
2022-07-18T03:31:08.576Z [info] MapCL.Graphics.Metal: Capabilities.mm:94: MTLFeatureSet_iOS_GPUFamily2_v2 YES
2022-07-18T03:31:08.576Z [info] MapCL.Graphics.Metal: Capabilities.mm:94: MTLFeatureSet_iOS_GPUFamily2_v3 YES
2022-07-18T03:31:08.576Z [info] MapCL.Graphics.Metal: Capabilities.mm:94: MTLFeatureSet_iOS_GPUFamily2_v4 YES
2022-07-18T03:31:08.576Z [info] MapCL.Graphics.Metal: Capabilities.mm:94: MTLFeatureSet_iOS_GPUFamily2_v5 YES
2022-07-18T03:31:08.577Z [info] MapCL.Graphics.Metal: Capabilities.mm:94: MTLFeatureSet_iOS_GPUFamily3_v1 YES
2022-07-18T03:31:08.577Z [info] MapCL.Graphics.Metal: Capabilities.mm:94: MTLFeatureSet_iOS_GPUFamily3_v2 YES
2022-07-18T03:31:08.577Z [info] MapCL.Graphics.Metal: Capabilities.mm:94: MTLFeatureSet_iOS_GPUFamily3_v3 YES
2022-07-18T03:31:08.577Z [info] MapCL.Graphics.Metal: Capabilities.mm:94: MTLFeatureSet_iOS_GPUFamily3_v4 YES
2022-07-18T03:31:08.577Z [info] MapCL.Graphics.Metal: Capabilities.mm:94: MTLFeatureSet_iOS_GPUFamily4_v1 YES
2022-07-18T03:31:08.577Z [info] MapCL.Graphics.Metal: Capabilities.mm:94: MTLFeatureSet_iOS_GPUFamily4_v2 YES
2022-07-18T03:31:08.577Z [info] MapCL.Graphics.Metal: Capabilities.mm:94: MTLFeatureSet_iOS_GPUFamily5_v1 YES
LocationSelectorViewController :: onMapReady: Entry
2022-07-18T03:31:10.348Z [warning] mapdisplay.clientlib.Style: StyleParser.cpp:2098: The style file is outdated. It contains no version. Supported version is 2. Use update_tomtom_style_file.py script to update it.

Device used for debug run:
iPhone XR, with iOS 15.5

Here’s the initial portion of the new v2 map style I’ve created, based on similar key [OnlineMaps] referenced in my v1 map that worked with v1 SDK:

{
“version”: 8,
“name”: “v2_sapphire”,
“metadata”: {},
“sources”: {
“poiTiles”: {
“maxzoom”: 22,
“minzoom”: 0,
“tiles”: [
https://a.api.tomtom.com/map/2/tile/poi/{z}/{x}/{y}.pbf?key=[OnlineMaps]”,
https://b.api.tomtom.com/map/2/tile/poi/{z}/{x}/{y}.pbf?key=[OnlineMaps]”,
https://c.api.tomtom.com/map/2/tile/poi/{z}/{x}/{y}.pbf?key=[OnlineMaps]”,
https://d.api.tomtom.com/map/2/tile/poi/{z}/{x}/{y}.pbf?key=[OnlineMaps]
],
“type”: “vector”
},
“vectorTiles”: {
“maxzoom”: 22,
“minzoom”: 0,
“tiles”: [
https://a.api.tomtom.com/map/2/tile/basic/{z}/{x}/{y}.pbf?key=[OnlineMaps]”,
https://b.api.tomtom.com/map/2/tile/basic/{z}/{x}/{y}.pbf?key=[OnlineMaps]”,
https://c.api.tomtom.com/map/2/tile/basic/{z}/{x}/{y}.pbf?key=[OnlineMaps]”,
https://d.api.tomtom.com/map/2/tile/basic/{z}/{x}/{y}.pbf?key=[OnlineMaps]
],
“type”: “vector”
},
“vectorTilesFlow”: {
“maxzoom”: 22,
“minzoom”: 0,
“tiles”: [
https://a.api.tomtom.com/traffic/map/4/tile/flow/relative/{z}/{x}/{y}.pbf?key=[OnlineMaps]&tags=[road_category,road_subcategory,traffic_level,left_hand_traffic,road_closure]”,
https://b.api.tomtom.com/traffic/map/4/tile/flow/relative/{z}/{x}/{y}.pbf?key=[OnlineMaps]&tags=[road_category,road_subcategory,traffic_level,left_hand_traffic,road_closure]”,
https://c.api.tomtom.com/traffic/map/4/tile/flow/relative/{z}/{x}/{y}.pbf?key=[OnlineMaps]&tags=[road_category,road_subcategory,traffic_level,left_hand_traffic,road_closure]”,
https://d.api.tomtom.com/traffic/map/4/tile/flow/relative/{z}/{x}/{y}.pbf?key=[OnlineMaps]&tags=[road_category,road_subcategory,traffic_level,left_hand_traffic,road_closure]
],
“type”: “vector”
},
“vectorTilesIncidents”: {
“maxzoom”: 22,
“minzoom”: 0,
“tiles”: [
https://a.api.tomtom.com/traffic/map/4/tile/incidents/{z}/{x}/{y}.pbf?key=[OnlineMaps]&tags=[road_category,road_subcategory,icon_category,magnitude,delay,left_hand_traffic]”,
https://b.api.tomtom.com/traffic/map/4/tile/incidents/{z}/{x}/{y}.pbf?key=[OnlineMaps]&tags=[road_category,road_subcategory,icon_category,magnitude,delay,left_hand_traffic]”,
https://c.api.tomtom.com/traffic/map/4/tile/incidents/{z}/{x}/{y}.pbf?key=[OnlineMaps]&tags=[road_category,road_subcategory,icon_category,magnitude,delay,left_hand_traffic]”,
https://d.api.tomtom.com/traffic/map/4/tile/incidents/{z}/{x}/{y}.pbf?key=[OnlineMaps]&tags=[road_category,road_subcategory,icon_category,magnitude,delay,left_hand_traffic]
],
“type”: “vector”
}
},
“sprite”: “https://api.tomtom.com/style/1/sprite/22.3.0-0/sprite?map=2%2Fbasic_street-dark-driving&poi=2%2Fpoi_dark&traffic_incidents=2%2Fincidents_dark&traffic_flow=2%2Fflow_relative-dark&key=[OnlineMaps]”,
“glyphs”: “https://api.tomtom.com/style/1/glyph/22.3.0-0/{fontstack}/{range}.pbf?key=[OnlineMaps]”,

Here’re the Pods currently installed:

  • TomTomNavKitOnlineFrameworkHTTP (7.1.6)
  • TomTomNavKitOnlineLoggingCore (2.0.19)
  • TomTomSDKCommon (0.2.1538)
  • TomTomSDKFeatureToggle (0.2.1538):
    • TomTomSDKCommon (= 0.2.1538)
  • TomTomSDKHTTPFramework (0.2.1538):
    • TomTomNavKitOnlineFrameworkHTTP (= 7.1.6)
    • TomTomSDKCommon (= 0.2.1538)
  • TomTomSDKLocation (0.2.1538):
    • TomTomSDKCommon (= 0.2.1538)
  • TomTomSDKMapsDisplay (0.2.1538):
    • TomTomNavKitOnlineLoggingCore (= 2.0.19)
    • TomTomSDKCommon (= 0.2.1538)
    • TomTomSDKFeatureToggle (= 0.2.1538)
    • TomTomSDKHTTPFramework (= 0.2.1538)
    • TomTomSDKLocation (= 0.2.1538)
    • TomTomSDKMapsDisplayEngine (= 2.3.0)
  • TomTomSDKMapsDisplayEngine (2.3.0)
  • TomTomSDKOnlineReverseGeocoder (0.2.1538):
    • TomTomSDKCommon (= 0.2.1538)
    • TomTomSDKReverseGeocoder (= 0.2.1538)
  • TomTomSDKOnlineRouting (0.2.1538):
    • TomTomSDKCommon (= 0.2.1538)
    • TomTomSDKRoute (= 0.2.1538)
    • TomTomSDKRouting (= 0.2.1538)
  • TomTomSDKReverseGeocoder (0.2.1538):
    • TomTomSDKCommon (= 0.2.1538)
  • TomTomSDKRoute (0.2.1538):
    • TomTomSDKCommon (= 0.2.1538)
  • TomTomSDKRouting (0.2.1538):
    • TomTomSDKCommon (= 0.2.1538)
    • TomTomSDKRoute (= 0.2.1538)
  • TomTomSDKSearch (0.2.1538):
    • TomTomSDKCommon (= 0.2.1538)

Queries:

  1. What causes the error and how to resolve it?
  2. update_tomtom_style_file.py: is this the required script to upgrade previous version map style file to new version? Which portion of the map style file is it missing in my new map style file created yesterday
  3. Although I’m using Maps SDK (no Navigation SDK), my map style includes flow and incidents - is this ok?

Hi,
Please, replace key=[OnlineMaps] with key={mapKey}
Can you send us the code with which you are loading this style?
You can also put your style file somewhere where we can take a look. That would be helpful. Thanks!

Hi Michal,

I’ve sent you the required files in a runnable workspace folder.
Folder location details are sent to you by email at:
developerrelations@tomtom.com

The key related changes are done in:
v2_sapphire.json

Thanks!