Skip to content

Commit 0bdb583

Browse files
author
Johannes Stein
committed
2 parents 49523d9 + 89e37cb commit 0bdb583

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ var subscription = DeviceEventEmitter.addListener(
5252
);
5353
```
5454

55-
It is recommended to set `NSWhenInUseUsageDescription` in your `Info.plist` file.
55+
It is recommended to set `NSLocationWhenInUseUsageDescription` in your `Info.plist` file.
5656

5757
## Background mode
5858
For background mode to work, a few things need to be configured:
@@ -66,6 +66,16 @@ Beacons.requestAlwaysAuthorization();
6666

6767
Here, it's also recommended to set `NSLocationAlwaysUsageDescription` in your `Info.plist` file.
6868

69+
Finally when killed or sleeping and a beacon is found your whole app wont be loaded, just the `didFinishLaunchingWithOptions:(NSDictionary *)launchOptions` delegate so you need to act on it there like:
70+
```
71+
// a region we were scanning for has appeared, ask to open us
72+
if([launchOptions objectForKey:@"UIApplicationLaunchOptionsLocationKey"])
73+
{
74+
//pop a notification to ask user to open, or maybe reload your scanner with delegate so that code fires
75+
}
76+
```
77+
78+
6979
## Methods
7080

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

0 commit comments

Comments
 (0)