Unexpected partition property set on cookies in iOS 18.4 beta

Apology for repost. I needed to fix the tags for original thread. https://developer.apple.com/forums/thread/777159

On iOS 18.3, I noted that partition "HTTPCookiePropertyKey: StoragePartition" is not observed to be set for cookies returned from the wkwebview cookie store.

Now on 18.4 beta 4 we are now seeing those same cookies are populated with a partition property. Is there documentation for this change? Is it intended to be suddenly populated in 18.4?

Now that partition property is set, HTTPCookieStorage.shared.cookies(for: serverUri) doesn't seem to return the expected cookies correctly. For context, we are using the cookies extracted from wkwebview, setting them in HTTPCookieStorage.shared and using URLSession to make network calls outside the webivew. Works fine once I forcefully set partition on the cookie to nil.

More details on what the cookie looks like here: https://feedbackassistant.apple.com/feedback/16906526

Hopefully this is on your radar?

Have you tried using the Cookies Store API in iOS 18.4 as it has become available?

Hi I am not entire sure what you mean by that - do you have a link this api? In our app we are using for out cookie operations. https://developer.apple.com/documentation/foundation/httpcookiestorage . Building on xcode 16 beta 2 doesn't make a difference.

Sorry to be clear I meant xcode 16.3 beta 2. Tried RC, same results.

Unexpected partition property set on cookies in iOS 18.4 beta
 
 
Q