Skip to content

Commit

Permalink
update monitoring and ranging md files
Browse files Browse the repository at this point in the history
  • Loading branch information
MacKentoch committed Mar 20, 2017
1 parent c65a3e2 commit d51a041
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion examples/samples/monitoring.ios.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ If you don't:

> For monitoring you don't have the choice you have to request `Always` authorization wether you need background mode or not.
[See matching lines in sample example]()
[See matching lines in sample example](https://github.com/MacKentoch/react-native-beacons-manager/blob/master/examples/samples/monitoring.ios.js#L36)

### 1 `Beacons.requestAlwaysAuthorization();` (**background and foreground use-case**)

Expand Down
11 changes: 7 additions & 4 deletions examples/samples/ranging.ios.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ If you don't:
You can request 2 kind of authorizations depending on the use case:
> Do you need background capability or not?
[See matching lines in sample example](https://github.com/MacKentoch/react-native-beacons-manager/blob/master/examples/samples/ranging.ios.js#L35)

### 1.a `Beacons.requestWhenInUseAuthorization();` (**foreground** only use-case)

Expand All @@ -29,6 +28,8 @@ Ensure to call
Beacons.requestWhenInUseAuthorization();
```

[See matching lines in sample example](https://github.com/MacKentoch/react-native-beacons-manager/blob/master/examples/samples/ranging.ios.js#L35)

#### in your iOS project

To be effective your `info.plist` file should have `Privacy - Location When In Use Usage Description` key defined (*empty value or not. It is better to define a value to a custom / more user-friendly message*).
Expand All @@ -49,6 +50,8 @@ Ensure to call
Beacons.requestAlwaysAuthorization();
```

[See matching lines in sample example](https://github.com/MacKentoch/react-native-beacons-manager/blob/master/examples/samples/ranging.ios.js#L35)

#### in your iOS project

To be effective your `info.plist` file should have `Privacy - Location Always Usage Description` key defined (*empty value or not. It is better to define a value to a custom / more user-friendly message*).
Expand All @@ -72,7 +75,7 @@ const region = { identifier, uuid };
Beacons.startRangingBeaconsInRegion(region);
```

[See matching lines in sample example](https://github.com/MacKentoch/react-native-beacons-manager/blob/master/examples/samples/ranging.ios.js#L40)
[See matching lines in sample example](https://github.com/MacKentoch/react-native-beacons-manager/blob/master/examples/samples/ranging.ios.js#L41)

## 3- register events

Expand Down Expand Up @@ -105,7 +108,7 @@ Note: beacons is an array of object:
}
```
[See matching lines in sample example](https://github.com/MacKentoch/react-native-beacons-manager/blob/master/examples/samples/ranging.ios.js#L55)
[See matching lines in sample example](https://github.com/MacKentoch/react-native-beacons-manager/blob/master/examples/samples/ranging.ios.js#L50)
## 4- on componentWillUnMount: unregister events and stop ranging
Expand All @@ -121,4 +124,4 @@ Beacons.stopRangingBeaconsInRegion();
DeviceEventEmitter.remove();
```
[See matching lines in sample example](https://github.com/MacKentoch/react-native-beacons-manager/blob/master/examples/samples/ranging.ios.js#L64)
[See matching lines in sample example](https://github.com/MacKentoch/react-native-beacons-manager/blob/master/examples/samples/ranging.ios.js#L61)

0 comments on commit d51a041

Please sign in to comment.