I am trying to port over my Obj-C code to a Swift project and am having difficulties compiling the SIGPIPE handler:
func SigPipeHandler()
{
print(@"We Got a Pipe Single :%d____________",s);
}
func application(_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil) -> Bool {
signal(SIGPIPE, SigPipeHandler);
// Override point for customization after application launch.
return true
}
I am getting the error:
Cannot convert value of type '() -> ()' to expected argument type '(@convention(c) (Int32) -> Void)?'