I am working on an iOS app, and I just switched to Swift 3.0, so now I have a lot of errors in my code, and I'm not sure how to fix some of them.
1) Error "Argument labels '(fileURLwithPathComponents:)' do not match any available overloads" on the second line of this snippet:
let pathArray = [dirPath, recordingName]
let filePath = URL(fileURLwithPathComponents: pathArray)
2) Error "Cannot convert value of type '(CMAccelerometerData?,NSError?)->() to expected argument type 'CMAccelermeterHandler' (aka ('Optional, Optional)->()')"
motionManager.startAccelerometerUpdates(to: OperationQueue.main) {
[weak self] (data: CMAccelerometerData?, error: NSError?) in self!.label.text = "started tracking"