waze shared application

Hello, few days ago i add some function that allow the user to navigate to location via Waze app.

The feature was worked fine for few days and this morning its stop working for some reason :-(

The code was not changed its suddenly dont work anymore. The button doesnt response to any click


@IBAction func Navvvv(sender: AnyObject) {
        if let wazeappURL = NSURL(string: "waze:/
            var latitude:Double = currentProduct!.BusLatitude
            var longtitude:Double = currentProduct!.BusLongtitude
            println("llallll")
            let canOpen = UIApplication.sharedApplication().canOpenURL(wazeappURL)
            var appURL:NSURL = NSURL(string:"waze:/
            UIApplication.sharedApplication().idleTimerDisabled = true
            println("\(appURL)")
        }
        else{
            var appURL:NSURL = NSURL(string: "http:/
            UIApplication.sharedApplication().openURL(appURL)
            UIApplication.sharedApplication().idleTimerDisabled = true
        }
    }

Is someone know what could be the reason its stop responding?

You should use lldb to set a breakpoint on line 02 (in the above code listing). Then run the app, press the button and see if the debugger breaks. If not, then probably the button's target/action is not set. If it does break, then you need to step to follow what the code is not doing which you expect it to do and why.

Thanks for reply, I cant see anything worng at lldb. The point is, that its worked for few days and then stop. If im paste the same code (waze://?ll=32.233, 31.333&navigate=yes) to the safary url its working fine. Any idea?

My guess is that the Target/Action somehow got broken in Interface Builder. Have you checked the connection in IB?

waze shared application
 
 
Q