When creating a NSAttributedString from an HTML string which contains an image link (https), somehow the downloaded image is cached. How did I came up with this fact?
- Install app.
- Open the app. Image is there.
- Close the app (terminate). Go for Airplane mode.
- Open the app. Image is still there.
- Delete the app completely, and reinstall.
- Open app while still in airplane mode. No image.
Caching the image is actually what I want. But I want to know deeper, how and where the image is cached. Since my app should work offline, I have to be sure that the image is cached or not. I dig into the docs and couldn't find anything. Can someone enlighten me? Thank you.
EDIT to clarify:
I am not using NSTextAttachment directly. I'm initializing NSAttributedString from a String, using UTF8 encoded data. Why I am talking about NSTextAttachment is I guess its automatically creating an NSTextAttachment for "img" tags in the HTML String.