ios - Error bridging Obj-C code and Swift: method "U" provided by method "Z" conflicts with optional requirement method "X" in protocol "Y" -


the goal incorporate pbjvision, objective-c library capturing photos , videos, swift app.

unfortunately, seeing error:

objective-c method 'vision:capturedvideo:error:' provided method 'vision(:capturedvideo:error:)' conflicts optional requirement method 'vision(:capturedvideo:error:)' in protocol 'pbjvisiondelegate'

here's delegate method triggering error:

func vision(vision: pbjvision, capturedvideo: nsdictionary, error: nserror) {     println("encountered error during recording \(error)")     println("captured video") } 

it seems problem patched while ago, on new version (i.e., changes mentioned incorporated) , still seeing error.

why happening, , how can fix this?

it's matter of translating objective-c swift. objective-c declaration looks this:

- (void)vision:(pbjvision *)vision capturedphoto:(nullable nsdictionary *)photodict error:(nullable nserror *)error; 

therefore, match it, declaration should this:

func vision(vision: pbjvision, capturedvideo videodict: [nsobject : anyobject]?, error: nserror?) {     // ... } 

Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

Kivy: Swiping (Carousel & ScreenManager) -