Skip to content

Commit 1ad2611

Browse files
committed
update README.md
1 parent dbcaa0b commit 1ad2611

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

README.md

+13-13
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
1-
# react-native-ibeacon
2-
[![Dependency Status](https://david-dm.org/geniuxconsulting/react-native-ibeacon.svg)](https://david-dm.org/geniuxconsulting/react-native-ibeacon)
1+
# react-native-location
32

4-
iBeacon support for React Native. The API is very similar to the CoreLocation Objective-C one with the only major difference that regions are plain JavaScript objects.
5-
Beacons don't work in the iOS simulator.
3+
Beacon and GPS location support for React Native. The API is very similar to the CoreLocation Objective-C one with the only major difference that regions are plain JavaScript objects.
4+
5+
NOTE: Beacons don't work in the iOS simulator.
66

77
## Installation
8-
Install using npm with `npm install --save react-native-ibeacon`
8+
Install using npm with `npm install --save react-native-location`
99

10-
You then need to add the Objective C part to your XCode project. Drag `RNBeacon.xcodeproj` from the `node_modules/react-native-ibeacon` folder into your XCode project. Click on the your project in XCode, goto Build Phases then Link Binary With Libraries and add `libRNBeacon.a` and `CoreLocation.framework`.
10+
You then need to add the Objective C part to your XCode project. Drag `RNLocation.xcodeproj` from the `node_modules/react-native-location` folder into your XCode project. Click on the your project in XCode, goto Build Phases then Link Binary With Libraries and add `libRNLocation.a` and `CoreLocation.framework`.
1111

12-
NOTE: Make sure you don't have the `RNBeacon` project open separately in XCode otherwise it won't work.
12+
NOTE: Make sure you don't have the `RNLocation` project open separately in XCode otherwise it won't work.
1313

1414
## Usage
1515
```javascript
1616
var React = require('react-native');
1717
var {DeviceEventEmitter} = React;
1818

19-
var Beacons = require('react-native-ibeacon');
19+
var Location = require('react-native-location');
2020

2121
// Define a region which can be identifier + uuid,
2222
// identifier + uuid + major or identifier + uuid + major + minor
@@ -27,12 +27,12 @@ var region = {
2727
};
2828

2929
// Request for authorization while the app is open
30-
Beacons.requestWhenInUseAuthorization();
30+
Location.requestWhenInUseAuthorization();
3131

32-
Beacons.startMonitoringForRegion(region);
33-
Beacons.startRangingBeaconsInRegion(region);
32+
Location.startMonitoringForRegion(region);
33+
Location.startRangingBeaconsInRegion(region);
3434

35-
Beacons.startUpdatingLocation();
35+
Location.startUpdatingLocation();
3636

3737
// Listen for beacon changes
3838
var subscription = DeviceEventEmitter.addListener(
@@ -70,7 +70,7 @@ Here, it's also recommended to set `NSLocationAlwaysUsageDescription` in your `I
7070

7171
## Methods
7272

73-
To access the methods, you need import the `react-native-ibeacon` module. This is done through `var Beacons = require('react-native-ibeacon')`.
73+
To access the methods, you need import the `react-native-location` module. This is done through `var Beacons = require('react-native-location')`.
7474

7575
### Beacons.requestWhenInUseAuthorization
7676
```javascript

0 commit comments

Comments
 (0)