OneDrive SDK in iOS Swift: Conflict between LiveOperationDelegate and LiveDownloadOperationDelegate protocols

352 views Asked by At

I integrate OneDrive SDK in the Swift app, but when I conform to both protocols LiveOperationDelegate and LiveDownloadOperationDelegate and I want to implement them:

func liveOperationSucceeded(operation: LiveOperation!) {}
func liveOperationFailed(error: NSError!, operation: LiveOperation!) {}
func liveOperationSucceeded(operation: LiveDownloadOperation!) {}
func liveOperationFailed(error: NSError!, operation: LiveDownloadOperation!) {}

I get this error message: Method 'liveOperationSucceeded' with Objective-C selector 'liveOperationSucceeded:' conflicts with previous declaration with the same Objective-C selector

How to solve it?

1

There are 1 answers

0
Pompetteuh On BEST ANSWER

The things I made so it work is that I created a new Class which inherit from LiveDownloadOperationDelegate. Then you just have to pass your instance as the delegate when calling the downloadFromPath function and you can handle the callback inside your new class.

I hope this answer to your question.