j2objc

j2objc + HttpURLConnection + CookieHandler


We are currently transpiling our android manager layer with j2objc to iOS. It seems to work very well, but now I have an issue with java.net and Cookie handling. We using an own implementation of a java.net.CookieStore for persisting Cookies

To use this CookieStore, I create a new default CookieManager, which works on Android but not on iOS:

    cookieManager = new CookieManager(new PersistentCookieStore(), CookiePolicy.ACCEPT_ALL);
    CookieHandler.setDefault(cookieManager);

I think, that the iOS implementation of HttpUrlConnection does not use the default CookieHandler.

Has anyone already experience with java.net.*, j2objc and persistent cookies?


Solution

  • Like @tball said, this was fixed in j2objc 1.0.1.