My app got crashed with Terminated due to signal 13 error while i am running it.
App is getting crashed during this method execution.
@objc func handlePipeNotification(notification: Notification)
{
inputPipe.fileHandleForReading.readInBackgroundAndNotify()
if let data = notification.userInfo![NSFileHandleNotificationDataItem] as? Data,
let str = String(data: data, encoding: String.Encoding.ascii) {
outputPipe.fileHandleForWriting.write(data)
}
}
Above method calls every time when something print on debug window.
If I remove this line than there is no issue.
outputPipe.fileHandleForWriting.write(data)
This line is writing back data to debug window.
Help me to solve this error.