Functions with generic type constraints cannot be exported to Objective-C.
As a workaround, you could define the function like below and check for protocol conformance inside the function implementations:
static internal func photoActionSheet(hostAndDelegateViewController: UIViewController) {
guard let vc = hostAndDelegateViewController as? protocol<UINavigationControllerDelegate, UIImagePickerControllerDelegate> else {
fatalError("hostAndDelegateViewController must conform UINavigationControllerDelegate and UIImagePickerControllerDelegate")
}
// let picker = UIImagePickerController()
// picker.delegate = vc
}
Likewise, Objective-C type UIViewController<UIImagePickerControllerDelegate, UINavigationControllerDelegate> * will be exported to Swift as UIViewController!
internal?