-
-
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-23116] iOS: Add session identifiers to urlSession events #7889
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -165,7 +165,7 @@ methods: | |
parameters: | ||
- name: handlerID | ||
summary: | | ||
Unique string identifer for the event (`backgroundfetch`, `silentpush` or `backgroundtransfer`) | ||
Unique string identifier for the event (`backgroundfetch`, `silentpush` or `backgroundtransfer`) | ||
that initiated the background opertation mode. | ||
type: String | ||
osver: {ios: {min: "7.0"}} | ||
|
@@ -191,7 +191,7 @@ methods: | |
parameters: | ||
- name: handlerId | ||
summary: | | ||
Unique string identifer for the event (`watchkitextensionrequest`) | ||
Unique string identifier for the event (`watchkitextensionrequest`) | ||
that initiated from the WatchKit extension calling the openParentApplication:reply method. | ||
type: String | ||
- name: userInfo | ||
|
@@ -748,7 +748,7 @@ events: | |
properties: | ||
- name: handlerId | ||
summary: | | ||
Unique string identifer for the `backgroundfetch` event. This identifier should be passed as the argument | ||
Unique string identifier for the `backgroundfetch` event. This identifier should be passed as the argument | ||
to the [endBackgroundHandler](Titanium.App.iOS.endBackgroundHandler) method. | ||
type: String | ||
platforms: [iphone, ipad] | ||
|
@@ -789,7 +789,7 @@ events: | |
properties: | ||
- name: handlerId | ||
summary: | | ||
Unique string identifer for the `silentpush` event. This identifier should be passed as the argument | ||
Unique string identifier for the `silentpush` event. This identifier should be passed as the argument | ||
to the [endBackgroundHandler](Titanium.App.iOS.endBackgroundHandler) method. | ||
type: String | ||
platforms: [iphone, ipad] | ||
|
@@ -825,7 +825,7 @@ events: | |
properties: | ||
- name: handlerId | ||
summary: | | ||
Unique string identifer for the `backgroundtransfer` event. This identifier should be passed as the argument | ||
Unique string identifier for the `backgroundtransfer` event. This identifier should be passed as the argument | ||
to the [endBackgroundHandler](Titanium.App.iOS.endBackgroundHandler) method. | ||
type: String | ||
- name: sessionId | ||
|
@@ -845,9 +845,13 @@ events: | |
This event only needs to be used if your app is using the `urlSession` module to download data. | ||
properties: | ||
- name: taskIdentifier | ||
summary: The `urlSession` download task's identifer. | ||
summary: The `urlSession` download task's identifier. | ||
type: Number | ||
|
||
- name: sessionIdentifier | ||
summary: The `urlSession` session identifier. If it does not exist, this property is not provided. | ||
type: String | ||
|
||
- name: bytesWritten | ||
summary: The number of bytes transferred since the last time this event was fired. | ||
type: Number | ||
|
@@ -864,6 +868,37 @@ events: | |
osver: {ios: {min: "7.0"}} | ||
since: "3.2.0" | ||
|
||
- name: uploadprogress | ||
summary: | | ||
Fired periodically to inform the app about the upload's progress of a [urlSession](Modules.URLSession). | ||
Available only on iOS 7 and later. | ||
description: | | ||
This event only needs to be used if your app is using the `urlSession` module to upload data. | ||
properties: | ||
- name: taskIdentifier | ||
summary: The `urlSession` upload task's identifier. | ||
type: Number | ||
|
||
- name: sessionIdentifier | ||
summary: The `urlSession` session identifier. If it does not exist, this property is not provided. | ||
type: String | ||
|
||
- name: bytesSent | ||
summary: The number of bytes transferred since the last time this event was fired. | ||
type: Number | ||
|
||
- name: totalBytesSent | ||
summary: The total number of bytes transferred so far. | ||
type: Number | ||
|
||
- name: totalBytesExpectedToSend | ||
summary: | | ||
The expected length of the file, as provided by the Content-Length header. If this | ||
header was not provided, the value is zero. | ||
type: Number | ||
osver: {ios: {min: "7.0"}} | ||
since: "3.2.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. Im guessing this was always in the code but missed from the docs ? 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. Yes, since 3.2.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. Okay, awesome :) |
||
|
||
- name: downloadcompleted | ||
summary: | | ||
Fired to indicate that a [urlSession's](Modules.URLSession) download task has finished downloading. | ||
|
@@ -872,9 +907,13 @@ events: | |
This event only needs to be used if your app is using the `urlSession` module to download data. | ||
properties: | ||
- name: taskIdentifier | ||
summary: The `urlSession` download task's identifer. | ||
summary: The `urlSession` download task's identifier. | ||
type: Number | ||
|
||
- name: sessionIdentifier | ||
summary: The `urlSession` session identifier. If it does not exist, this property is not provided. | ||
type: String | ||
|
||
- name: data | ||
summary: The downloaded data as a Titanium.Blob object. | ||
type: Titanium.Blob | ||
|
@@ -893,9 +932,13 @@ events: | |
the hostname or connect to the host. | ||
properties: | ||
- name: taskIdentifier | ||
summary: The `urlSession` download task's identifer. | ||
summary: The `urlSession` download task's identifier. | ||
type: Number | ||
|
||
- name: sessionIdentifier | ||
summary: The `urlSession` session identifier. If it does not exist, this property is not provided. | ||
type: String | ||
|
||
- name: success | ||
summary: Indicates if the operation succeeded. Returns true if download succeeded, false otherwise. | ||
type: Boolean | ||
|
@@ -929,6 +972,10 @@ events: | |
is now safe to invoke [endBackgroundHandler](Titanium.App.iOS.endBackgroundHandler) | ||
method with the `handlerID` or to begin any internal updates that may result in invoking | ||
this method. | ||
properties: | ||
- name: sessionIdentifier | ||
summary: The `urlSession` session identifier. If it does not exist, this property is not provided. | ||
type: String | ||
osver: {ios: {min: "7.0"}} | ||
since: "3.2.0" | ||
|
||
|
@@ -970,7 +1017,7 @@ events: | |
properties: | ||
- name: handlerId | ||
summary: | | ||
Unique string identifer for the `watchkitextensionrequest` event. This identifier should be passed an argument | ||
Unique string identifier for the `watchkitextensionrequest` event. This identifier should be passed an argument | ||
to the [sendWatchExtensionReply](Titanium.App.iOS.sendWatchExtensionReply) method. | ||
type: String | ||
- name: userInfo | ||
|
@@ -995,7 +1042,7 @@ events: | |
properties: | ||
- name: activityType | ||
summary: | | ||
Unique string identifer for the handoff user activity. The identifier must be defined in your `tiapp.xml` file. | ||
Unique string identifier for the handoff user activity. The identifier must be defined in your `tiapp.xml` file. | ||
type: String | ||
- name: searchableItemActivityIdentifier | ||
summary: | | ||
|
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.
Should we not add since to this property ?
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.
Yep, the problem is, that event properties cannot have the
since
property. I added it to the summary.