I have a comprehension question. I want to use the Dropbox Objective-C framework in an iOS Swift app.
I already imported the framework successfully and set the import clause in the bridging header.
I was also able to run the authorization process so I think the framework works.
Then I try to use a component of the framework which is declared as protocol:
class ViewController: UIViewController, DBRestClientDelegate {
}
I sat the delegate property, called the loadMetadata method and implemented the corresponding event function:
let dbRestClient = DBRestClient(DBSession.shared())
dbRestClient.delegate = self
dbRestClient.loadMetadata("/")
...
func restClient(client: DBRestClient!, loadedMetadata metadata: DBMetadata!) {
}
What I'm wondering is that it seems not necessary to implement all methods of that protocol. Is this correct? In Swift implementing only a part of a protocol is enough?
I ask because the compiler displays no errors but the delegation method is never called.