Cookies with captive portal (CNA)

Hi

I'm developing a captive portal with cookies, it works fine in devices like Macs, laptops and android devices but cookies don't work on iPhone.

I'm creating cookies in js with document.cookie but the problem is when I connect my iPhone and close CNA, it destroy them and next time I try to connect, cookies don't exist anymore.

Someone can help me to figure out how can I avoid CNA destroy my cookies?

Cookies with captive portal (CNA)
 
 
Q