I was trying to fetch inBytes and outBytes in content filter. Each time it is logging 0 as inByte and outByte in handleNewFlow flow description. How to get inByte and outByte of the flow?
IMPORTANT Unless explicitly documented otherwise, the descriptions that get logged by Apple types are not considered API. They can and do change regularly. For a classic example of this, see this thread. Do not write code that relies on the exact format of a description.
Having said that, the fact that the flow’s description indicates that zero bytes have been transferred doesn’t surprise me. The purpose of a filter is to either allow or deny a flow. If a flow were allowed to transfer bytes before your filter first sees it in its -handleNew…
method, that’d undermine this purpose.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"