Not getting HTML data for the first time.

I am using NEdatafilterprovider to check whether a particular keyword is present in the webpage or not. When i first load the website i am not able to get the HTML webpage but when reloading i am getting the html data. Why is it so?

I am using func handleInboundData(from flow: NEFilterFlow, readBytesStartOffset offset: Int, readBytes: Data)

to get the data into readBytes variable.

Replies

Haven’t we already had this conversation?

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

I have checked the data is not being cached, I am not just able to see the data we are getting in readBytes in utf8 format.

How do you get the mimeType of the data if the flow is not browserflow. So that i can be able to decode the data being send in the handleInboundData method