Debugging and troubleshooting
In this section you can find effective debugging and troubleshooting techniques, common issues, and instructions how to generate insightful logs.
Common issues
When you run into trouble, be sure to check first the minimum requirements, supported devices, and the list of known issues in the changelog.
-
I see only a blank white map: Make sure that your HERE credentials are valid and set as described in the Get started section. Also, make sure that your device is able to make an internet connection. With slower internet connections, it may take a while until you see the first map tiles loaded. Please also make sure that your device time is set correctly. In rare cases, a wrongly set device time can lead to authentication issues with some backend services.
-
In the logs I see "No map content will be displayed until valid config is provided.": Make sure that your code is really calling
loadScene(). -
Xcode complains that
MapViewis not known: Make sure to integrate the HERE SDK framework as described in the Get started section. -
Xcode doesn't load the module definition for
heresdk: This is a Xcode SourceKit error known asrdar://42087654. Make sure to integrate the HERE SDK framework as described in the Get started section. Also ensure that path to your project and framework doesn't contain space symbols. -
Xcode does not compile my project for simulators. I am using a computer with a M1 chip. You are using a HERE SDK version below 4.9.2.0. Try to use a newer HERE SDK version or run in Rosetta mode by excluding the ARM64 architecture for "Any iOS Simulator SDK" in the
Build Settings/Architectures/Excluded Architectures/Debugsetting within Xcode. Select this option in the "TARGETS" settings. Note that this may slightly slow down the performance when running the simulator. -
I see no map and/or my HERE SDK calls do nothing: If you see the following log message "These credentials do not authorize access" then your credentials are not valid. Make sure you use a working set of credentials. Credentials from the 3.x versions are not compatible. Credentials from Explore are not compatible with Navigate.
-
When I build for iOS release, the build fails: If you see in the logs that
-embed-bitcodeis executed, make sure to explicitly disable bitcode optimization. Apple deprecated bitcode and the HERE SDK no longer supports it. AddENABLE_BITCODE = NO;to your debug / release Xcode build settings. -
Archive option is grayed out or disabled in Xcode: The most common reason for the "Archive" option being disabled is having a simulator selected as the active scheme. Make sure you have a physical device or the Generic iOS Device option selected in the active scheme dropdown menu. Another reason could be wrong workspace setting. Click on the workspace in the Project Navigator, then click on Edit Scheme. Under the "Build" tab, ensure that the "Archive" checkbox is selected for your target.
-
How should offline maps be handled to avoid large updates and storage spikes? When using the Navigate license, you can query installed
Regionswith theMapDownloaderto monitor downloaded regions, estimate update sizes, and avoid unnecessary downloads. Try to compare existing region sizes before triggering updates. If you want more control, avoid automatic updates. You can find more information here.
Specify the log level
The LogControl class allows to log HERE SDK messages for various predefined LogLevel values - even for release builds of your app. Make sure to call the LogControl before initializing the HERE SDK:
// Disable any logs from HERE SDK.
// Make sure to call this before initializing the HERE SDK.
LogControl.disableLoggingToConsole()The above allows to silence all HERE SDK related console logs. Note that this is not recommended for debug builds, as you may miss important log messages when you want to investigate issues.
A log level can be specified like so:
LogControl.enableLoggingToConsole(LogLevel.logLevelInfo)When you provide a LogLevel, you set a minimal level of messages which will be reported, based on the below hierarchy:
logLevelInfologLevelWarninglogLevelErrorlogLevelFatal
For example, if you set logLevelError, then logLevelInfo and logLevelWarning will be excluded from the logs. All others will be logged.
Setting logLevelOff silences all logs.
All log messages are prefixed with "hsdk-" to help you easily identify messages originating from the HERE SDK.
You can also use the LogAppender interface to insert your own logging class to the LogControl class. This enables you to filter log messages based on different runtime conditions. For instance, you could choose to log only errors of type logLevelError. By default, this selective logging isn’t possible, as only the log hierarchy determines which messages are allowed through, and you cannot adjust this minimum level after initializing the HERE SDK. By adding your own logging class, however, you gain complete control.
When running an iOS simulator, you can obtain logs without running Xcode by executing the following command from the terminal:
xcrun simctl spawn booted log stream --level debug
Generate meaningful logs
For many issues, the logs you see in Xcode are containing already the most relevant information. For crashes and ANRs you may want to dig deeper and take a look at the device logs:
- Open Xcode and connect the device.
- In Xcode click on the top-level menu bar tab for Window.
- Tap on Device and Simulation.
- Tap on View Device Logs - or in newer Xcode versions tap on Open Recent Logs or Open Console.
Updated 10 hours ago