react-native-cookies
react-native-cookies copied to clipboard
[iOS] Use NSHTTPCookieMaximumAge for version 1 cookies
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
The offending line: https://github.com/joeferraro/react-native-cookies/blob/master/RNCookieManagerIOS/RNCookieManagerIOS.m#L24
PR are welcome