-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[TIMOB-16275] iOS Cookie management #5466
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
7da4946
[TIMOB-16275] iOS - Initial implementation of TiNetworkCookie
pec1985 6a75ff8
[TIMOB-16275] Minor git conflict
pec1985 06f3550
Merge branch 'refs/heads/master' into timob-16275
pec1985 5711bc4
[TIMOB-16275] iOS Cookies, added documentation, fixed headers, added …
pec1985 1f718bc
[TIMOB-16275] Added apiName to Cookie proxy
pec1985 f4a96e4
[TIMOB-16275] iOS Cookies, added property to get all stored cookies.
pec1985 311b588
[TIMOB-16275] Fixed spacing on Cookies
pec1985 bab8ee0
[TIMOB-16275] Addressed comments on PR
pec1985 d634cff
[TIMOB-16275] Addressed more comments from PR
pec1985 6f622ef
[TIMOB-16275] More tweaks to cookie management
pec1985 b3548b9
[TIMOB-16275] Cookie, fixed "secure" property
pec1985 File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,16 +37,19 @@ methods: | |
summary: | | ||
Adds a cookie to the HTTP client cookie store. | ||
description: | | ||
Any existing cookie with the same domain and name will be replaced with the new cookie. This is a bug | ||
On iOS, the cookie will override an existing cookie with the same name, domain and path, if any. The cookie's | ||
`expiryDate` property must be a date later than the creating date, otherwise the cookie will not persist in the | ||
cookie storage. | ||
On Android, any existing cookie with the same domain and name will be replaced with the new cookie. This is a bug | ||
in [BasicCookieStore](http://developer.android.com/reference/org/apache/http/impl/cookie/BasicClientCookie.html) | ||
because based on `RFC6265`, an existing cookie can be evicted and replaced only when it has the same cookie-name, | ||
domain-value and path-value with the new cookie. | ||
parameters: | ||
- name: cookie | ||
summary: The cookie to add | ||
type: Titanium.Network.Cookie | ||
platforms: [android] | ||
since: "3.2.0" | ||
platforms: [android, iphone, ipad] | ||
since: {android: "3.2.0", iphone: "3.3.0", ipad: "3.3.0"} | ||
|
||
- name: addSystemCookie | ||
summary: | | ||
|
@@ -176,8 +179,8 @@ methods: | |
type: String | ||
returns: | ||
type: Array<Titanium.Network.Cookie> | ||
platforms: [android] | ||
since: "3.2.0" | ||
platforms: [android, iphone, ipad] | ||
since: {android: "3.2.0", iphone: "3.3.0", ipad: "3.3.0"} | ||
|
||
- name: getHTTPCookiesForDomain | ||
summary: | | ||
|
@@ -190,8 +193,8 @@ methods: | |
type: String | ||
returns: | ||
type: Array<Titanium.Network.Cookie> | ||
platforms: [android] | ||
since: "3.2.0" | ||
platforms: [android, iphone, ipad] | ||
since: {android: "3.2.0", iphone: "3.3.0", ipad: "3.3.0"} | ||
|
||
- name: getSystemCookies | ||
summary: | | ||
|
@@ -218,8 +221,8 @@ methods: | |
- name: removeAllHTTPCookies | ||
summary: | | ||
Removes all the cookies from the HTTP client cookie store. | ||
platforms: [android] | ||
since: "3.2.0" | ||
platforms: [android, iphone, ipad] | ||
since: {android: "3.2.0", iphone: "3.3.0", ipad: "3.3.0"} | ||
|
||
- name: removeAllSystemCookies | ||
summary: | | ||
|
@@ -242,8 +245,8 @@ methods: | |
- name: name | ||
summary: The name of the cookie to remove. It is case-sensitive. | ||
type: String | ||
platforms: [android] | ||
since: "3.2.0" | ||
platforms: [android, iphone, ipad] | ||
since: {android: "3.2.0", iphone: "3.3.0", ipad: "3.3.0"} | ||
|
||
- name: removeHTTPCookiesForDomain | ||
summary: | | ||
|
@@ -254,8 +257,8 @@ methods: | |
- name: domain | ||
summary: The domain of the cookie to remove. It is case-insensitive. | ||
type: String | ||
platforms: [android] | ||
since: "3.2.0" | ||
platforms: [android, iphone, ipad] | ||
since: {android: "3.2.0", iphone: "3.3.0", ipad: "3.3.0"} | ||
|
||
- name: removeSystemCookie | ||
summary: | | ||
|
@@ -337,6 +340,7 @@ properties: | |
platforms: [iphone, ipad] | ||
deprecated: | ||
since: "1.7.0" | ||
|
||
- name: NETWORK_LAN | ||
summary: | | ||
A [networkType](Titanium.Network.networkType) value indicating that the device is | ||
|
@@ -350,6 +354,7 @@ properties: | |
[change](Titanium.Network.change) event. | ||
type: Number | ||
permission: read-only | ||
|
||
- name: NETWORK_MOBILE | ||
summary: | | ||
A [networkType](Titanium.Network.networkType) value indicating that the device is | ||
|
@@ -360,6 +365,7 @@ properties: | |
[change](Titanium.Network.change) event. | ||
type: Number | ||
permission: read-only | ||
|
||
- name: NETWORK_NONE | ||
summary: | | ||
A [networkType](Titanium.Network.networkType) value indicating that no | ||
|
@@ -370,6 +376,7 @@ properties: | |
[change](Titanium.Network.change) event. | ||
type: Number | ||
permission: read-only | ||
|
||
- name: NETWORK_UNKNOWN | ||
summary: | | ||
A [networkType](Titanium.Network.networkType) value indicating that the | ||
|
@@ -380,6 +387,7 @@ properties: | |
[change](Titanium.Network.change) event. | ||
type: Number | ||
permission: read-only | ||
|
||
- name: NETWORK_WIFI | ||
summary: | | ||
A [networkType](Titanium.Network.networkType) value indicating that the | ||
|
@@ -390,26 +398,31 @@ properties: | |
[change](Titanium.Network.change) event. | ||
type: Number | ||
permission: read-only | ||
|
||
- name: NOTIFICATION_TYPE_ALERT | ||
summary: Constant value for an Alert style push notification. | ||
platforms: [iphone, ipad] | ||
permission: read-only | ||
type: Number | ||
|
||
- name: NOTIFICATION_TYPE_BADGE | ||
summary: Constant value for a Badge style push notification. | ||
type: Number | ||
permission: read-only | ||
platforms: [iphone, ipad] | ||
|
||
- name: NOTIFICATION_TYPE_SOUND | ||
summary: Constant value for a Sound style push notification. | ||
type: Number | ||
permission: read-only | ||
platforms: [iphone, ipad] | ||
|
||
- name: NOTIFICATION_TYPE_NEWSSTAND | ||
summary: Constant value for a Newsstand style push notification. Only available on iOS5 and later | ||
type: Number | ||
permission: read-only | ||
platforms: [iphone, ipad] | ||
|
||
- name: READ_MODE | ||
deprecated: | ||
since: "1.7.0" | ||
|
@@ -422,6 +435,7 @@ properties: | |
type: Number | ||
permission: read-only | ||
platforms: [iphone, ipad] | ||
|
||
- name: READ_WRITE_MODE | ||
deprecated: | ||
since: "1.7.0" | ||
|
@@ -434,6 +448,7 @@ properties: | |
type: Number | ||
permission: read-only | ||
platforms: [iphone, ipad] | ||
|
||
- name: SOCKET_CLOSED | ||
deprecated: | ||
since: "1.7.0" | ||
|
@@ -446,6 +461,7 @@ properties: | |
type: Number | ||
permission: read-only | ||
platforms: [iphone, ipad] | ||
|
||
- name: SOCKET_CONNECTED | ||
deprecated: | ||
since: "1.7.0" | ||
|
@@ -458,6 +474,7 @@ properties: | |
type: Number | ||
permission: read-only | ||
platforms: [iphone, ipad] | ||
|
||
- name: SOCKET_ERROR | ||
deprecated: | ||
since: "1.7.0" | ||
|
@@ -470,6 +487,7 @@ properties: | |
type: Number | ||
permission: read-only | ||
platforms: [iphone, ipad] | ||
|
||
- name: SOCKET_INITIALIZED | ||
deprecated: | ||
since: "1.7.0" | ||
|
@@ -482,6 +500,7 @@ properties: | |
type: Number | ||
permission: read-only | ||
platforms: [iphone, ipad] | ||
|
||
- name: SOCKET_LISTENING | ||
deprecated: | ||
since: "1.7.0" | ||
|
@@ -494,6 +513,7 @@ properties: | |
type: Number | ||
permission: read-only | ||
platforms: [iphone, ipad] | ||
|
||
- name: WRITE_MODE | ||
deprecated: | ||
since: "1.7.0" | ||
|
@@ -506,60 +526,77 @@ properties: | |
type: Number | ||
permission: read-only | ||
platforms: [iphone, ipad] | ||
|
||
- name: TLS_VERSION_1_0 | ||
summary: Constant value specifying TLS version 1.0 for SSL. | ||
type: Number | ||
permission: read-only | ||
platforms: [iphone, ipad] | ||
since: "1.8.0.1" | ||
|
||
- name: TLS_VERSION_1_1 | ||
summary: Constant value specifying TLS version 1.1 for SSL. | ||
type: Number | ||
permission: read-only | ||
platforms: [iphone, ipad] | ||
since: "1.8.0.1" | ||
|
||
- name: TLS_VERSION_1_2 | ||
summary: Constant value specifying TLS version 1.2 for SSL. | ||
type: Number | ||
permission: read-only | ||
platforms: [iphone, ipad] | ||
since: "1.8.0.1" | ||
|
||
- name: allHTTPCookies | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Spacing |
||
summary: A list of all cookies in the cookie storage. | ||
type: Array<Titanium.Network.Cookie> | ||
permission: read-only | ||
platforms: [iphone, ipad] | ||
since: "3.3.0" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Spacing |
||
|
||
- name: networkType | ||
summary: Network type value as a constant. | ||
description: | | ||
One of the `NETWORK` constants defined in <Titanium.Network>. | ||
type: Number | ||
permission: read-only | ||
|
||
- name: networkTypeName | ||
summary: Network type as a String. Returns one of `NONE`, `WIFI`, `LAN`, `MOBILE`, or `UNKNOWN`. | ||
type: String | ||
permission: read-only | ||
|
||
- name: online | ||
summary: Boolean value indicating if the device can reach the Internet. | ||
description: | | ||
The `online` property is `true` if the device can currently reach the Internet | ||
using either WiFi, mobile network or LAN. | ||
type: Boolean | ||
permission: read-only | ||
|
||
- name: remoteDeviceUUID | ||
summary: | | ||
Remote device UUID if the device is registered with the Apple Push Notification | ||
Service, or null if it is not registered. | ||
platforms: [iphone, ipad] | ||
type: String | ||
permission: read-only | ||
|
||
- name: remoteNotificationTypes | ||
summary: Array of push notification type constants enabled for the application. | ||
platforms: [iphone, ipad] | ||
type: Array<Number> | ||
permission: read-only | ||
|
||
- name: remoteNotificationsEnabled | ||
summary: | | ||
Indicates whether push notifications have been enabled using | ||
[registerForPushNotifications](Titanium.Network.registerForPushNotifications). | ||
platforms: [iphone, ipad] | ||
type: Boolean | ||
permission: read-only | ||
|
||
- name: httpURLFormatter | ||
summary: User-defined function that is called everytime HTTPClient connects to a remote resource. | ||
description: | | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You might be able to set platform specific permissions. If it is possible please do that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Talked to @bhatfield, the
permission
tag cannot platform specific.