@maccesar/titools 2.10.1 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS-VERCEL-RESEARCH.md +23 -12
- package/README.md +81 -182
- package/agents/ti-pro.md +8 -14
- package/lib/cleanup.js +13 -0
- package/lib/commands/skills.js +2 -1
- package/lib/config.js +9 -11
- package/lib/platform.js +1 -1
- package/package.json +2 -3
- package/skills/alloy-guides/SKILL.md +0 -190
- package/skills/alloy-guides/references/CLI_TASKS.md +0 -233
- package/skills/alloy-guides/references/CONCEPTS.md +0 -171
- package/skills/alloy-guides/references/CONTROLLERS.md +0 -279
- package/skills/alloy-guides/references/MODELS.md +0 -1214
- package/skills/alloy-guides/references/PURGETSS.md +0 -46
- package/skills/alloy-guides/references/VIEWS_DYNAMIC.md +0 -235
- package/skills/alloy-guides/references/VIEWS_STYLES.md +0 -375
- package/skills/alloy-guides/references/VIEWS_WITHOUT_CONTROLLERS.md +0 -102
- package/skills/alloy-guides/references/VIEWS_XML.md +0 -581
- package/skills/alloy-guides/references/WIDGETS.md +0 -160
- package/skills/alloy-howtos/SKILL.md +0 -181
- package/skills/alloy-howtos/references/best_practices.md +0 -121
- package/skills/alloy-howtos/references/cli_reference.md +0 -230
- package/skills/alloy-howtos/references/config_files.md +0 -158
- package/skills/alloy-howtos/references/custom_tags.md +0 -148
- package/skills/alloy-howtos/references/debugging_troubleshooting.md +0 -78
- package/skills/alloy-howtos/references/samples.md +0 -156
- package/skills/ti-api/SKILL.md +0 -109
- package/skills/ti-api/references/api-android.md +0 -675
- package/skills/ti-api/references/api-app-platform.md +0 -636
- package/skills/ti-api/references/api-core.md +0 -764
- package/skills/ti-api/references/api-data-network.md +0 -641
- package/skills/ti-api/references/api-media.md +0 -655
- package/skills/ti-api/references/api-modules-ble-bluetooth.md +0 -657
- package/skills/ti-api/references/api-modules-coremotion-urlsession.md +0 -411
- package/skills/ti-api/references/api-modules-map.md +0 -632
- package/skills/ti-api/references/api-modules-nfc.md +0 -725
- package/skills/ti-api/references/api-modules-social-misc.md +0 -526
- package/skills/ti-api/references/api-services.md +0 -700
- package/skills/ti-api/references/api-ui-android.md +0 -499
- package/skills/ti-api/references/api-ui-extras.md +0 -702
- package/skills/ti-api/references/api-ui-ios-animator.md +0 -378
- package/skills/ti-api/references/api-ui-ios.md +0 -756
- package/skills/ti-api/references/api-ui-lists.md +0 -581
- package/skills/ti-api/references/api-ui-text-input.md +0 -607
- package/skills/ti-api/references/api-ui-views.md +0 -572
- package/skills/ti-api/references/api-ui-windows-navigation.md +0 -676
- package/skills/ti-api/references/api-xml-global.md +0 -743
- package/skills/ti-guides/SKILL.md +0 -75
- package/skills/ti-guides/references/advanced-data-and-images.md +0 -155
- package/skills/ti-guides/references/android-manifest.md +0 -97
- package/skills/ti-guides/references/app-distribution.md +0 -373
- package/skills/ti-guides/references/application-frameworks.md +0 -366
- package/skills/ti-guides/references/cli-reference.md +0 -700
- package/skills/ti-guides/references/coding-best-practices.md +0 -150
- package/skills/ti-guides/references/commonjs-advanced.md +0 -279
- package/skills/ti-guides/references/hello-world.md +0 -99
- package/skills/ti-guides/references/hyperloop-native-access.md +0 -458
- package/skills/ti-guides/references/javascript-primer.md +0 -402
- package/skills/ti-guides/references/reserved-words.md +0 -36
- package/skills/ti-guides/references/resources.md +0 -172
- package/skills/ti-guides/references/style-and-conventions.md +0 -104
- package/skills/ti-guides/references/tiapp-config.md +0 -655
- package/skills/ti-howtos/SKILL.md +0 -143
- package/skills/ti-howtos/references/android-platform-deep-dives.md +0 -609
- package/skills/ti-howtos/references/automation-fastlane-appium.md +0 -96
- package/skills/ti-howtos/references/buffer-codec-streams.md +0 -162
- package/skills/ti-howtos/references/cross-platform-development.md +0 -358
- package/skills/ti-howtos/references/debugging-profiling.md +0 -473
- package/skills/ti-howtos/references/extending-titanium.md +0 -684
- package/skills/ti-howtos/references/google-maps-v2.md +0 -172
- package/skills/ti-howtos/references/ios-map-kit.md +0 -149
- package/skills/ti-howtos/references/ios-platform-deep-dives.md +0 -595
- package/skills/ti-howtos/references/local-data-sources.md +0 -310
- package/skills/ti-howtos/references/location-and-maps.md +0 -267
- package/skills/ti-howtos/references/media-apis.md +0 -268
- package/skills/ti-howtos/references/notification-services.md +0 -539
- package/skills/ti-howtos/references/remote-data-sources.md +0 -339
- package/skills/ti-howtos/references/tutorials.md +0 -552
- package/skills/ti-howtos/references/using-modules.md +0 -182
- package/skills/ti-howtos/references/web-content-integration.md +0 -288
- package/skills/ti-howtos/references/webpack-build-pipeline.md +0 -125
|
@@ -1,411 +0,0 @@
|
|
|
1
|
-
# Modules: CoreMotion & URLSession API Reference
|
|
2
|
-
|
|
3
|
-
## Modules.CoreMotion
|
|
4
|
-
> Allows Titanium client applications to access Apple's CoreMotion APIs.
|
|
5
|
-
> Extends Ti.Module
|
|
6
|
-
> Platforms: ios
|
|
7
|
-
> Type: module
|
|
8
|
-
|
|
9
|
-
The Core Motion module provides access to Apple's CoreMotion APIs. The Core Motion module provides support
|
|
10
|
-
for monitoring various hardware sensors on iOS devices, such as the accelerometer, gyroscope, and
|
|
11
|
-
magnetometer. The Core Motion module allows you to access the metrics provided by these sensors.
|
|
12
|
-
|
|
13
|
-
For instruction and examples of using the Core Motion Module, see the
|
|
14
|
-
[Core Motion Module guide]().
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
### Requirements
|
|
18
|
-
|
|
19
|
-
This module only works with devices running iOS 7 and later. Not all devices have the same hardware sensors,
|
|
20
|
-
so all features may not be available for all devices. Be sure to use the API to check the device
|
|
21
|
-
for the existence of a feature.
|
|
22
|
-
|
|
23
|
-
You can only test the Core Motion module on a device. The Core Motion API cannot be tested on the iOS
|
|
24
|
-
|
|
25
|
-
*(See full overview in titanium-docs)*
|
|
26
|
-
|
|
27
|
-
### Constants (23)
|
|
28
|
-
- **ATTITUDE_REFERENCE_FRAME_X_ARBITRARY_CORRECTED_Z_\***: ATTITUDE_REFERENCE_FRAME_X_ARBITRARY_CORRECTED_Z_VERTICAL
|
|
29
|
-
- **ATTITUDE_REFERENCE_FRAME_X_ARBITRARY_Z_\***: ATTITUDE_REFERENCE_FRAME_X_ARBITRARY_Z_VERTICAL
|
|
30
|
-
- **ATTITUDE_REFERENCE_FRAME_X_MAGNETIC_NORTH_Z_\***: ATTITUDE_REFERENCE_FRAME_X_MAGNETIC_NORTH_Z_VERTICAL
|
|
31
|
-
- **ATTITUDE_REFERENCE_FRAME_X_TRUE_NORTH_Z_\***: ATTITUDE_REFERENCE_FRAME_X_TRUE_NORTH_Z_VERTICAL
|
|
32
|
-
- **AUTHORIZATION_STATUS_\***: AUTHORIZATION_STATUS_RESTRICTED, AUTHORIZATION_STATUS_DENIED, AUTHORIZATION_STATUS_AUTHORIZED
|
|
33
|
-
- **AUTHORIZATION_STATUS_NOT_\***: AUTHORIZATION_STATUS_NOT_DETERMINED
|
|
34
|
-
- **ERROR_\***: ERROR_NULL, ERROR_UNKNOWN
|
|
35
|
-
- **ERROR_DEVICE_REQUIRES_\***: ERROR_DEVICE_REQUIRES_MOVEMENT
|
|
36
|
-
- **ERROR_INVALID_\***: ERROR_INVALID_PARAMETER
|
|
37
|
-
- **ERROR_MOTION_ACTIVITY_NOT_\***: ERROR_MOTION_ACTIVITY_NOT_AVAILABLE, ERROR_MOTION_ACTIVITY_NOT_AUTHORIZED, ERROR_MOTION_ACTIVITY_NOT_ENTITLED
|
|
38
|
-
- **ERROR_TRUE_NORTH_NOT_\***: ERROR_TRUE_NORTH_NOT_AVAILABLE
|
|
39
|
-
- **MAGNETIC_FIELD_CALIBRATION_ACCURACY_\***: MAGNETIC_FIELD_CALIBRATION_ACCURACY_UNCALIBRATED, MAGNETIC_FIELD_CALIBRATION_ACCURACY_LOW, MAGNETIC_FIELD_CALIBRATION_ACCURACY_MEDIUM, MAGNETIC_FIELD_CALIBRATION_ACCURACY_HIGH
|
|
40
|
-
- **MOTION_ACTIVITY_CONFIDENCE_\***: MOTION_ACTIVITY_CONFIDENCE_LOW, MOTION_ACTIVITY_CONFIDENCE_MEDIUM, MOTION_ACTIVITY_CONFIDENCE_HIGH
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
---
|
|
46
|
-
|
|
47
|
-
## Modules.CoreMotion.Accelerometer
|
|
48
|
-
> Allows Titanium client applications to access CoreMotion's Accelerometer APIs.
|
|
49
|
-
> Extends Ti.Proxy
|
|
50
|
-
> Platforms: ios
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
### Methods (6)
|
|
54
|
-
| Method | Returns | Platform | Description |
|
|
55
|
-
|--------|---------|----------|-------------|
|
|
56
|
-
| setAccelerometerUpdateInterval(interval) | void | ios | The interval in milliseconds, for providing accelerometer updates to the callba… |
|
|
57
|
-
| startAccelerometerUpdates(callback) | void | ios | Starts accelerometer updates. |
|
|
58
|
-
| stopAccelerometerUpdates(—) | void | ios | Stops accelerometer updates. |
|
|
59
|
-
| isAccelerometerActive(—) | Boolean | ios | Returns a Boolean indicating whether accelerometer updates are currently happen… |
|
|
60
|
-
| isAccelerometerAvailable(—) | Boolean | ios | Returns a Boolean indicating whether an accelerometer is available on the devic… |
|
|
61
|
-
| getAccelerometerData(—) | CoreMotionAccelerometerData | ios | Returns the latest sample of accelerometer data. |
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
### Related Types
|
|
65
|
-
|
|
66
|
-
#### CoreMotionAccelerometerData
|
|
67
|
-
> Representation of an accelerometer event.
|
|
68
|
-
|
|
69
|
-
| Property | Type | Description |
|
|
70
|
-
|----------|------|-------------|
|
|
71
|
-
| timestamp | Number | The time when the logged item is valid. |
|
|
72
|
-
| acceleration | CoreMotionAcceleration | The acceleration measured by the accelerometer. |
|
|
73
|
-
|
|
74
|
-
---
|
|
75
|
-
|
|
76
|
-
## Modules.CoreMotion.Altimeter
|
|
77
|
-
> Allows Titanium client applications to access CoreMotion's Altimeter APIs. Note: This API is only available in iOS 8 and later.
|
|
78
|
-
> Extends Ti.Proxy
|
|
79
|
-
> Platforms: ios
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
### Methods (6)
|
|
83
|
-
| Method | Returns | Platform | Description |
|
|
84
|
-
|--------|---------|----------|-------------|
|
|
85
|
-
| isSupported(—) | Boolean | ios | Returns a Boolean value indicating whether the altimeter is supported on the cu… |
|
|
86
|
-
| isRelativeAltitudeAvailable(—) | Boolean | ios | Returns a Boolean value indicating whether the altimeter is supported on the cu… |
|
|
87
|
-
| authorizationStatus(—) | Number | ios | Returns the current authorization status for altimeter. |
|
|
88
|
-
| hasAltimeterPermissions(—) | Boolean | ios | Determines whether the device supports reporting relative altitude changes. |
|
|
89
|
-
| startRelativeAltitudeUpdates(callback) | void | ios | Starts relative altitude updates, providing data to the given handler on the gi… |
|
|
90
|
-
| stopRelativeAltitudeUpdates(—) | void | ios | Stops relative altitude updates. |
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
---
|
|
94
|
-
|
|
95
|
-
## Modules.CoreMotion.DeviceMotion
|
|
96
|
-
> Allows Titanium client applications to access CoreMotion's DeviceMotion APIs.
|
|
97
|
-
> Extends Ti.Proxy
|
|
98
|
-
> Platforms: ios
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
### Methods (10)
|
|
102
|
-
| Method | Returns | Platform | Description |
|
|
103
|
-
|--------|---------|----------|-------------|
|
|
104
|
-
| setShowsDeviceMovementDisplay(show) | void | ios | Controls whether the device-movement display is shown. |
|
|
105
|
-
| setDeviceMotionUpdateInterval(interval) | void | ios | The interval in milliseconds, for providing device-motion updates to the callba… |
|
|
106
|
-
| startDeviceMotionUpdatesUsingReferenceFrame(args, callback) | void | ios | Starts device-motion updates using a reference frame. |
|
|
107
|
-
| startDeviceMotionUpdates(callback) | void | ios | Starts device-motion updates. |
|
|
108
|
-
| stopDeviceMotionUpdates(—) | void | ios | Stops device-motion updates. |
|
|
109
|
-
| getAttitudeReferenceFrame(—) | Number | ios | Returns either the reference frame currently being used or the default attitude… |
|
|
110
|
-
| availableAttitudeReferenceFrames(—) | Number | ios | Returns a bitmask specifying the available attitude reference frames on the dev… |
|
|
111
|
-
| isDeviceMotionActive(—) | Boolean | ios | Returns a Boolean value that determines whether the app is receiving updates fr… |
|
|
112
|
-
| isDeviceMotionAvailable(—) | Boolean | ios | Returns a Boolean indicating whether device-motion is available on the device. |
|
|
113
|
-
| getDeviceMotion(—) | CoreMotionDeviceMotionData | ios | Returns the latest sample of device-motion data. |
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
### Related Types
|
|
117
|
-
|
|
118
|
-
#### CoreMotionDeviceMotionData
|
|
119
|
-
> Representation of a device-motion event.
|
|
120
|
-
|
|
121
|
-
| Property | Type | Description |
|
|
122
|
-
|----------|------|-------------|
|
|
123
|
-
| timestamp | Number | The time when the logged item is valid. |
|
|
124
|
-
| attitude | CoreMotionAttitude | The attitude of the device. |
|
|
125
|
-
| rotationRate | CoreMotionRotationRate | The roation rate of the device. |
|
|
126
|
-
| gravity | CoreMotionAcceleration | The gravity acceleration vector expressed in the device's reference frame. |
|
|
127
|
-
| userAcceleration | CoreMotionAcceleration | The acceleration that the user is giving to the device. |
|
|
128
|
-
| magneticField | CoreMotionCalibratedMagneticField | Returns the magnetic field vector with respect to the device. |
|
|
129
|
-
| heading | Number | Returns heading angle in the range [0,360) degrees with respect to the attitude… |
|
|
130
|
-
|
|
131
|
-
#### CoreMotionReferenceFrameArgs
|
|
132
|
-
> Dictionary of arguments passed to the [DeviceMotion.startDeviceMotionUpdatesUsingReferenceFrame()](Modules.CoreMotion.DeviceMotion.startDeviceMotionUpdatesUsingReferenceFrame) method.
|
|
133
|
-
|
|
134
|
-
| Property | Type | Description |
|
|
135
|
-
|----------|------|-------------|
|
|
136
|
-
| referenceFrame | Number | A constant identifying the reference frame to use for device-motion updates. |
|
|
137
|
-
|
|
138
|
-
---
|
|
139
|
-
|
|
140
|
-
## Modules.CoreMotion.Gyroscope
|
|
141
|
-
> Allows Titanium client applications to access CoreMotion's Gyroscope APIs.
|
|
142
|
-
> Extends Ti.Proxy
|
|
143
|
-
> Platforms: ios
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
### Methods (6)
|
|
147
|
-
| Method | Returns | Platform | Description |
|
|
148
|
-
|--------|---------|----------|-------------|
|
|
149
|
-
| setGyroUpdateInterval(interval) | void | ios | The interval in milliseconds, for providing gyroscope updates to the callback. |
|
|
150
|
-
| startGyroUpdates(callback) | void | ios | Starts gyroscope updates. |
|
|
151
|
-
| stopGyroUpdates(—) | void | ios | Stops gyroscope updates. |
|
|
152
|
-
| isGyroActive(—) | Boolean | ios | Returns a Boolean indicating whether gyroscope updates are currently happening. |
|
|
153
|
-
| isGyroAvailable(—) | Boolean | ios | Returns a Boolean indicating whether a gyroscope is available on the device. |
|
|
154
|
-
| getGyroData(—) | CoreMotionGyroData | ios | Returns the latest sample of gyroscope data. |
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
### Related Types
|
|
158
|
-
|
|
159
|
-
#### CoreMotionGyroData
|
|
160
|
-
> Representation of a gyroscope event.
|
|
161
|
-
|
|
162
|
-
| Property | Type | Description |
|
|
163
|
-
|----------|------|-------------|
|
|
164
|
-
| timestamp | Number | The time when the logged item is valid. |
|
|
165
|
-
| rotationRate | CoreMotionRotationRate | The rotation rate measured by the gyroscope. |
|
|
166
|
-
|
|
167
|
-
---
|
|
168
|
-
|
|
169
|
-
## Modules.CoreMotion.Magnetometer
|
|
170
|
-
> Allows Titanium client applications to access CoreMotion's Magnetometer APIs.
|
|
171
|
-
> Extends Ti.Proxy
|
|
172
|
-
> Platforms: ios
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
### Methods (6)
|
|
176
|
-
| Method | Returns | Platform | Description |
|
|
177
|
-
|--------|---------|----------|-------------|
|
|
178
|
-
| setMagnetometerUpdateInterval(interval) | void | ios | The interval in milliseconds, for providing magnetometer updates to the callbac… |
|
|
179
|
-
| startMagnetometerUpdates(callback) | void | ios | Starts magnetometer updates. |
|
|
180
|
-
| stopMagnetometerUpdates(—) | void | ios | Stops magnetometer updates. |
|
|
181
|
-
| isMagnetometerActive(—) | Boolean | ios | Returns a Boolean indicating whether magnetometer updates are currently happeni… |
|
|
182
|
-
| isMagnetometerAvailable(—) | Boolean | ios | Returns a Boolean indicating whether a magnetometer is available on the device. |
|
|
183
|
-
| getMagnetometerData(—) | CoreMotionMagnetometerData | ios | Returns the latest sample of magnetometer data. |
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
### Related Types
|
|
187
|
-
|
|
188
|
-
#### CoreMotionMagnetometerData
|
|
189
|
-
> Representation of a magnetometer event.
|
|
190
|
-
|
|
191
|
-
| Property | Type | Description |
|
|
192
|
-
|----------|------|-------------|
|
|
193
|
-
| timestamp | Number | The time when the logged item is valid. |
|
|
194
|
-
| magneticField | CoreMotionMagneticField | The magnetic field measured by the magnetometer. |
|
|
195
|
-
|
|
196
|
-
---
|
|
197
|
-
|
|
198
|
-
## Modules.CoreMotion.MotionActivity
|
|
199
|
-
> Allows Titanium client applications to access CoreMotion's MotionActivity APIs.
|
|
200
|
-
> Extends Ti.Proxy
|
|
201
|
-
> Platforms: ios
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
### Methods (4)
|
|
205
|
-
| Method | Returns | Platform | Description |
|
|
206
|
-
|--------|---------|----------|-------------|
|
|
207
|
-
| isActivityAvailable(—) | Boolean | ios | Returns a Boolean indicating whether motion activity data is available on the c… |
|
|
208
|
-
| startActivityUpdates(callback) | void | ios | Starts the delivery of current motion activity updates to your app. |
|
|
209
|
-
| stopActivityUpdates(—) | void | ios | Stops the delivery of motion activity updates to your app. |
|
|
210
|
-
| queryActivity(args, callback) | void | ios | Gathers and returns historical motion activity data for the specified time peri… |
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
### Related Types
|
|
214
|
-
|
|
215
|
-
#### CoreMotionQueryActivityArgs
|
|
216
|
-
> Dictionary of arguments to pass to the [MotionActivity.queryActivity()](Modules.CoreMotion.MotionActivity.queryActivity) method.
|
|
217
|
-
|
|
218
|
-
| Property | Type | Description |
|
|
219
|
-
|----------|------|-------------|
|
|
220
|
-
| start | Date | The start time to use when gathering motion data. |
|
|
221
|
-
| end | Date | The end time to use when gathering motion data. |
|
|
222
|
-
|
|
223
|
-
---
|
|
224
|
-
|
|
225
|
-
## Modules.CoreMotion.Pedometer
|
|
226
|
-
> Allows Titanium client applications to access CoreMotion's Pedometer APIs. Note: This API is only available in iOS 8 and later.
|
|
227
|
-
> Extends Ti.Proxy
|
|
228
|
-
> Platforms: ios
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
### Methods (9)
|
|
232
|
-
| Method | Returns | Platform | Description |
|
|
233
|
-
|--------|---------|----------|-------------|
|
|
234
|
-
| isSupported(—) | Boolean | ios | Returns a Boolean value indicating whether the pedometer is supported on the cu… |
|
|
235
|
-
| isCadenceAvailable(—) | Boolean | ios | Returns a Boolean value indicating whether cadence information is available on … |
|
|
236
|
-
| isDistanceAvailable(—) | Boolean | ios | Returns a Boolean value indicating whether distance support is available on the… |
|
|
237
|
-
| isFloorCountingAvailable(—) | Boolean | ios | Returns a Boolean value indicating whether floor counting is available on the c… |
|
|
238
|
-
| isPaceAvailable(—) | Boolean | ios | Returns a Boolean value indicating whether pace information is available on the… |
|
|
239
|
-
| isStepCountingAvailable(—) | Boolean | ios | Returns a Boolean indicating whether step-counting support is available on the … |
|
|
240
|
-
| startPedometerUpdates(args, callback) | void | ios | Starts the delivery of recent pedestrian-related data to your app. |
|
|
241
|
-
| stopPedometerUpdates(—) | void | ios | Stops the delivery of recent pedestrian data updates to your app. |
|
|
242
|
-
| queryPedometerData(args, callback) | void | ios | Retrieves the data between the specified start and end dates. |
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
### Related Types
|
|
246
|
-
|
|
247
|
-
#### CoreMotionStartPedometerArgs
|
|
248
|
-
> Dictionary of arguments to pass to the [Pedometer.startPedometerUpdates()](Modules.CoreMotion.Pedometer.startPedometerUpdates) method.
|
|
249
|
-
|
|
250
|
-
| Property | Type | Description |
|
|
251
|
-
|----------|------|-------------|
|
|
252
|
-
| start | Date | The start time to use when gathering pedometer data. |
|
|
253
|
-
|
|
254
|
-
---
|
|
255
|
-
|
|
256
|
-
## Modules.CoreMotion.StepCounter
|
|
257
|
-
> Allows Titanium client applications to access CoreMotion's (deprecated) StepCounter APIs.
|
|
258
|
-
> Extends Ti.Proxy
|
|
259
|
-
> Platforms: ios
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
### Methods (4)
|
|
263
|
-
| Method | Returns | Platform | Description |
|
|
264
|
-
|--------|---------|----------|-------------|
|
|
265
|
-
| isStepCountingAvailable(—) | Boolean | ios | Returns a Boolean indicating whether step-counting support is available on the … |
|
|
266
|
-
| startStepCountingUpdates(args, callback) | void | ios | Starts the delivery of current step-counting data to your app. |
|
|
267
|
-
| stopStepCountingUpdates(—) | void | ios | Stops the delivery of step-counting updates to your app. |
|
|
268
|
-
| queryStepCount(args, callback) | void | ios | Gathers and returns historical step count data for the specified time period. |
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
### Related Types
|
|
272
|
-
|
|
273
|
-
#### CoreMotionQueryStepCountArgs
|
|
274
|
-
> Dictionary of arguments to pass to the [Stepcounter.queryStepCount()](Modules.CoreMotion.Stepcounter.queryStepCount) method.
|
|
275
|
-
|
|
276
|
-
| Property | Type | Description |
|
|
277
|
-
|----------|------|-------------|
|
|
278
|
-
| start | Date | The start time to use when gathering step count data. |
|
|
279
|
-
| end | Date | The end time to use when gathering step count data. |
|
|
280
|
-
|
|
281
|
-
#### CoreMotionStartStepCountingArgs
|
|
282
|
-
> Dictionary of arguments to pass to the [StepCounter.startStepCountingUpdates()](Modules.CoreMotion.Stepcounter.startStepCountingUpdates) method.
|
|
283
|
-
|
|
284
|
-
| Property | Type | Description |
|
|
285
|
-
|----------|------|-------------|
|
|
286
|
-
| stepCounts | Number | The number of steps to record before executing the callback. The number of step… |
|
|
287
|
-
|
|
288
|
-
---
|
|
289
|
-
|
|
290
|
-
## Modules.URLSession
|
|
291
|
-
> Wrapper to support iOS's NSURLSession class for background downloads.
|
|
292
|
-
> Extends Ti.Module
|
|
293
|
-
> Platforms: ios
|
|
294
|
-
> Type: module
|
|
295
|
-
|
|
296
|
-
These APIs are supported on iOS 7 and later.
|
|
297
|
-
|
|
298
|
-
The URL session module (`com.appcelerator.urlSession`) provides the application the ability to
|
|
299
|
-
download large content via HTTP while the application is in the background. With this module, you can
|
|
300
|
-
|
|
301
|
-
1. Create a URL session and a background download task.
|
|
302
|
-
2. Monitor events to check the progress of the download and session.
|
|
303
|
-
3. Cancel downloads and invalidate sessions.
|
|
304
|
-
|
|
305
|
-
URL session events are monitored through the following iOS application-level events:
|
|
306
|
-
|
|
307
|
-
* <Titanium.App.iOS.backgroundtransfer>
|
|
308
|
-
* <Titanium.App.iOS.downloadprogress>
|
|
309
|
-
* <Titanium.App.iOS.downloadcompleted>
|
|
310
|
-
* <Titanium.App.iOS.sessioncompleted>
|
|
311
|
-
|
|
312
|
-
*(See full overview in titanium-docs)*
|
|
313
|
-
|
|
314
|
-
### Properties (unique: 1/2)
|
|
315
|
-
| Property | Type | Default | Platform | Description |
|
|
316
|
-
|----------|------|---------|----------|-------------|
|
|
317
|
-
| configuration | Modules.URLSession.SessionConfiguration | — | ios | The configuration used for this url session. |
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
### Methods (3)
|
|
321
|
-
| Method | Returns | Platform | Description |
|
|
322
|
-
|--------|---------|----------|-------------|
|
|
323
|
-
| finishTasksAndInvalidate(session) | void | ios | Invalidates the given session object, allowing any outstanding tasks to finish. |
|
|
324
|
-
| invalidateAndCancel(session) | void | ios | Cancels all outstanding tasks and then invalidates the session object. |
|
|
325
|
-
| backgroundDownloadTaskWithURL(session, url) | String | ios | Creates a download task for the specified URL, within the provided session obje… |
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
---
|
|
329
|
-
|
|
330
|
-
## Modules.URLSession.Session
|
|
331
|
-
> The session object used to start new tasks.
|
|
332
|
-
> Extends Ti.Module
|
|
333
|
-
> Platforms: ios
|
|
334
|
-
> Type: module
|
|
335
|
-
|
|
336
|
-
These APIs are supported on iOS 7 and later.
|
|
337
|
-
|
|
338
|
-
The NSURLSession class and related classes provide an API for downloading content.
|
|
339
|
-
This API provides a rich set of delegate methods for supporting authentication and gives
|
|
340
|
-
your app the ability to perform background downloads when your app is not running or, in iOS,
|
|
341
|
-
while your app is suspended.
|
|
342
|
-
|
|
343
|
-
[iOS Background Services guide]().
|
|
344
|
-
|
|
345
|
-
### Properties (unique: 1/3)
|
|
346
|
-
| Property | Type | Default | Platform | Description |
|
|
347
|
-
|----------|------|---------|----------|-------------|
|
|
348
|
-
| configuration | Modules.URLSession.SessionConfiguration | — | ios | The configuration used for this url session. |
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
### Methods (7)
|
|
352
|
-
| Method | Returns | Platform | Description |
|
|
353
|
-
|--------|---------|----------|-------------|
|
|
354
|
-
| finishTasksAndInvalidate(—) | void | ios | Invalidates the given session object, allowing any outstanding tasks to finish. |
|
|
355
|
-
| invalidateAndCancel(—) | void | ios | Cancels all outstanding tasks and then invalidates the session object. |
|
|
356
|
-
| downloadTask(args) | String | ios | Creates a download task for the specified URL, within the provided session obje… |
|
|
357
|
-
| uploadTask(args) | String | ios | Creates a upload task for the specified URL, within the provided session object… |
|
|
358
|
-
| dataTask(args) | String | ios | Creates a data task for the specified URL, within the provided session object a… |
|
|
359
|
-
| reset(callback) | void | ios | Empties all cookies, cache and credential stores, removes disk files, calls <Mo… |
|
|
360
|
-
| flush(callback) | void | ios | Flushes storage to disk and clear transient network caches. |
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
### Related Types
|
|
364
|
-
|
|
365
|
-
#### DownloadTaskType
|
|
366
|
-
> The parameter for [downloadTask](Modules.URLSession.Session.downloadTask) method.
|
|
367
|
-
|
|
368
|
-
| Property | Type | Description |
|
|
369
|
-
|----------|------|-------------|
|
|
370
|
-
| url | String | The remote url used for this data task. |
|
|
371
|
-
|
|
372
|
-
#### UploadDataTaskType
|
|
373
|
-
> The parameter for [uploadTask](Modules.URLSession.Session.uploadTask) method.
|
|
374
|
-
|
|
375
|
-
| Property | Type | Description |
|
|
376
|
-
|----------|------|-------------|
|
|
377
|
-
| url | String | The remote url used for this data task. |
|
|
378
|
-
| data | Ti.Blob | The data blob used for this data task. |
|
|
379
|
-
| method | String | The request method (e.g. POST or PUT) |
|
|
380
|
-
| requestHeaders | String | Additional request headers to pass to the request. |
|
|
381
|
-
|
|
382
|
-
---
|
|
383
|
-
|
|
384
|
-
## Modules.URLSession.SessionConfiguration
|
|
385
|
-
> The session configuration object used to create new url sessions.
|
|
386
|
-
> Extends Ti.Module
|
|
387
|
-
> Platforms: ios
|
|
388
|
-
> Type: module
|
|
389
|
-
|
|
390
|
-
These APIs are supported on iOS 7 and later.
|
|
391
|
-
|
|
392
|
-
An NSURLSessionConfiguration object defines the behavior and policies to use
|
|
393
|
-
when uploading and downloading data using an URLSession object. When uploading
|
|
394
|
-
or downloading data, creating a configuration object is always the first step
|
|
395
|
-
you must take. You use this object to configure the timeout values, caching
|
|
396
|
-
policies, connection requirements, and other types of information that you
|
|
397
|
-
intend to use with your URLSession object.
|
|
398
|
-
|
|
399
|
-
[iOS Background Services guide]().
|
|
400
|
-
|
|
401
|
-
### Properties (unique: 2/4)
|
|
402
|
-
| Property | Type | Default | Platform | Description |
|
|
403
|
-
|----------|------|---------|----------|-------------|
|
|
404
|
-
| identifier | String | — | ios | The unique identifier for the configuration object. |
|
|
405
|
-
| HTTPHeaderFields | Object | — | ios | Specifies additional headers which will be set on outgoing requests. Keys and v… |
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
---
|
|
411
|
-
|