Hello All, I am an iOS dev. Just started learning ...
# ktor
v
Hello All, I am an iOS dev. Just started learning Kotlin and Multi Platform. I have a question. Please find the scenario below, 1. I have an iOS application which has the authentication flow. After authentication the cookies are stored into NSHttpCookiesStorage. 2. I have a KMP module that can download files. 3. The download KMP module is using Ktor and KtorCookieStorage. In the above scenario, ktor will not be able to take the cookies from iOS NSHttpCookieStorage. What is the best way to pass the cookies from NSHttpCookieStorage to Ktor? Please help me to find a way here. Thanks in Advance.
a
You can implement the
CookiesStorage
interface and use the
NSHttpCookiesStorage
as the underlying storage. You can take a look at the AcceptAllCookiesStorage as an example.
👍 2
v
thank you 🙂