react-native-cookies icon indicating copy to clipboard operation
react-native-cookies copied to clipboard

[iOS] Use NSHTTPCookieMaximumAge for version 1 cookies

Open aleclarson opened this issue 9 years ago • 2 comments

From Apple's documentation:

NSHTTPCookieExpires

An NSDate object or NSString object specifying the expiration date for the cookie.

This cookie attribute is only used for Version 0 cookies. This cookie attribute is optional.

Available in iOS 2.0 and later.

NSHTTPCookieMaximumAge

An NSString object containing an integer value stating how long in seconds the cookie should be kept, at most.

Only valid for Version 1 cookies and later. Default is "0". This cookie attribute is optional.

Available in iOS 2.0 and later.

https://developer.apple.com/library/ios/documentation/Cocoa/Reference/Foundation/Classes/NSHTTPCookie_Class/#//apple_ref/doc/constant_group/HTTP_Cookie_Attribute_Keys

aleclarson avatar Jul 18 '16 06:07 aleclarson

The offending line: https://github.com/joeferraro/react-native-cookies/blob/master/RNCookieManagerIOS/RNCookieManagerIOS.m#L24

aleclarson avatar Jul 18 '16 06:07 aleclarson

PR are welcome

iegik avatar Aug 29 '17 14:08 iegik