Skip to content

Commit 24f2b41

Browse files
committed
chore: update sensor configuration docs
Changes:\nM README.md\n\nNotes:\n- Updated implementation, tests, and/or README formatting for this package.\n- agent, ai, and context packages are intentionally excluded.
1 parent d0e111a commit 24f2b41

1 file changed

Lines changed: 16 additions & 16 deletions

File tree

README.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,20 @@ You can integrate this framework into your project via Swift Package Manager (Sw
1414

1515
### SwiftPM
1616
1. Open Package Manager Windows
17-
* Open `Xcode` -> Select `Menu Bar` -> `File` -> `App Package Dependencies...`
17+
* Open `Xcode` -> Select `Menu Bar` -> `File` -> `App Package Dependencies...`
1818

1919
2. Find the package using the manager
2020
* Select `Search Package URL` and type `git@github.com:awareframework/com.awareframework.ios.sensor.timezone.git`
2121

2222
3. Import the package into your target.
2323

24-
## Public functions
24+
## Public Functions
2525

2626
### TimezoneSensor
2727

28-
* `init(config:TimezoneSensor.Config?)` : Initializes the timezone sensor with the optional configuration.
29-
* `start()`: Starts the timezone sensor with the optional configuration.
30-
* `stop()`: Stops the service.
28+
+ `init(config:TimezoneSensor.Config?)`: Initializes the timezone sensor with the optional configuration.
29+
+ `start()`: Starts the timezone sensor with the optional configuration.
30+
+ `stop()`: Stops the service.
3131

3232

3333
### TimezoneSensor.Config
@@ -37,18 +37,18 @@ Class to hold the configuration of the sensor.
3737
#### Fields
3838

3939
+ `sensorObserver: TimezoneObserver`: Callback for live data updates.
40-
+ `enabled: Boolean` Sensor is enabled or not. (default = `false`)
41-
+ `debug: Boolean` enable/disable logging to `Logcat`. (default = `false`)
42-
+ `label: String` Label for the data. (default = "")
43-
+ `deviceId: String` Id of the device that will be associated with the events and the sensor. (default = "")
44-
+ `dbEncryptionKey` Encryption key for the database. (default = `null`)
45-
+ `dbType: Engine` Which db engine to use for saving data. (default = `Engine.DatabaseType.NONE`)
46-
+ `dbPath: String` Path of the database. (default = "aware_timezone")
47-
+ `dbHost: String` Host for syncing the database. (default = `null`)
40+
+ `enabled: Bool`: Sensor is enabled or not. (default = `false`)
41+
+ `debug: Bool`: Enable/disable logging. (default = `false`)
42+
+ `label: String`: Label for the data. (default = `""`)
43+
+ `deviceId: String`: Id of the device that will be associated with the events and the sensor. (default = `""`)
44+
+ `dbEncryptionKey: String?`: Encryption key for the database. (default = `nil`)
45+
+ `dbType: DatabaseType`: Which db engine to use for saving data. (default = `.none`)
46+
+ `dbPath: String`: Path of the database. (default = `"aware_timezone"`)
47+
+ `dbHost: String?`: Host for syncing the database. (default = `nil`)
4848

4949
## Broadcasts
5050

51-
+ `TimezoneSensor.ACTION_AWARE_TIMEZONE` broadcasted when there is new timezone information. Extra includes `TimezoneSensor.EXTRA_DATA` for the new timezone.
51+
+ `TimezoneSensor.ACTION_AWARE_TIMEZONE`: broadcasted when there is new timezone information. Extra includes `TimezoneSensor.EXTRA_DATA` for the new timezone.
5252

5353
## Data Representations
5454

@@ -64,10 +64,10 @@ Class to hold the configuration of the sensor.
6464
| os | String | Operating system of the device (ex. ios) |
6565
| jsonVersion | Int | JSON schema version |
6666

67-
## Example usage
67+
## Example Usage
6868

6969
```swift
70-
let timezoneSensor = TimezoneSensor.init(TimezoneSensor.Config().apply{ config in
70+
let timezoneSensor = TimezoneSensor.init(TimezoneSensor.Config().apply { config in
7171
config.sensorObserver = Observer()
7272
config.debug = true
7373
})

0 commit comments

Comments
 (0)