Tweaks docs and GHA (#3)
This commit is contained in:
parent
228062267a
commit
c411962ede
|
@ -8,11 +8,17 @@ on:
|
|||
|
||||
jobs:
|
||||
macos:
|
||||
runs-on: macos-11 # macos-latest is still 10.15, which we don't support
|
||||
runs-on: macos-12 # macos-latest is still 10.15, which we don't support
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: devbotsxyz/xcode-select@v1.1.0
|
||||
- uses: maxim-lobanov/setup-xcode@v1
|
||||
with:
|
||||
version: latest
|
||||
xcode-version: latest-stable
|
||||
- uses: actions/checkout@v3
|
||||
- name: Build & Test
|
||||
run: xcodebuild -scheme 'GeoMonitor' -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 13'
|
||||
run: xcodebuild test -scheme 'GeoMonitor' -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 14' -resultBundlePath TestResults
|
||||
- uses: kishikawakatsumi/xcresulttool@v1.7.0
|
||||
with:
|
||||
path: TestResults.xcresult
|
||||
if: success() || failure()
|
||||
# ^ This is important because the action will be run
|
||||
# even if the test fails in the previous step.
|
10
README.md
10
README.md
|
@ -15,15 +15,8 @@ Relies on a mixture of techniques, such as:
|
|||
- Go to *Signing & Capabilities*, *Background Modes* and make sure *Location updates* is ticket.
|
||||
- Go to *Info*, and make sure you have usage descriptions for "Privacy - Location Always", "Privacy - Location Always and When in Use", and "Privacy - Location When In Use" set.
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
TODO:
|
||||
|
||||
- [ ] Optional: Set maximum number of regions for GeoMonitor to use. If this
|
||||
is not specified, it'll use the maximum of 20. Set this if you're
|
||||
monitoring regions yourself.
|
||||
|
||||
```swift
|
||||
self.monitor = GeoMonitor {
|
||||
// Fetch the latest regions; also called when entering one.
|
||||
|
@ -42,15 +35,12 @@ self.monitor = GeoMonitor {
|
|||
// Called when a visit was registered
|
||||
}
|
||||
}
|
||||
monitor.maxRegionsToMonitor = 18
|
||||
monitor.enableVisitMonitoring = true
|
||||
monitor.start()
|
||||
```
|
||||
|
||||
## Considerations
|
||||
|
||||
TODO:
|
||||
|
||||
Regular iOS restrictions apply, such as:
|
||||
|
||||
> [...] When Background App Refresh is disabled, either for your app or for all apps, the user must explicitly launch your app to resume the delivery of all location-related events.
|
||||
|
|
Loading…
Reference in New Issue