1

I have updated my MSDKUI project from 2.0.0 to 2.1.1 and have made some changes make the navigation work. My project is based on "GuideMeToHERE". The updated podfile is: target 'GuideMeToHERE' do platform :ios, '12.0' pod 'HEREMapsUI', '2.1.1' end

Voice Guidance stops working when I set up the GuidanceManeuverMonitor.

This is my function setUpGuidanceViews(route: NMARoute)

    private func setUpGuidanceViews(route: NMARoute) {

        NMANavigationManager.sharedInstance().delegate = self

        //*** If I comment these three lines out the voice guidance works!
        maneuverMonitor = GuidanceManeuverMonitor(route: route)
        maneuverMonitor.delegate = self
        customizeGuidanceManeuverView()

What can I do to have the maneuver monitor working and have voice guidance?

4

2 回答 2

2

我通过将其中一位代表更改为更具体来修复它:

    //NMANavigationManager.sharedInstance().delegate = self
    NavigationManagerDelegateDispatcher.shared.add(delegate: self)
于 2019-08-01T06:31:23.773 回答
2

除了@CSchwarz 的回答,我还必须实现以下 NMANavigationManagerDelegate 函数:

func navigationManager(_ navigationManager: NMANavigationManager, shouldPlayVoiceFeedback text: String?) -> Bool {
    return true
}

NavigationManagerDelegateDispatcher.shared.add(delegate: self)
于 2019-08-05T13:39:31.077 回答