Skip to content

Commit 348ee42

Browse files
committed
📝 Update background observer docs
1 parent c7fd726 commit 348ee42

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

docs/background.md

+6-4
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,17 @@ following:
2727
If you followed the [Background Processing](https://github.com/agencyenterprise/react-native-health#background-processing)
2828
step in the README, you can skip this one.
2929

30-
To setup that in your project, in XCode open your `ios/AppDelegate.m` file and uncomment the
31-
lines with a comment `Uncomment this line to use background observers`:
30+
To setup that in your project, in XCode open your `ios/AppDelegate.m` file and add the
31+
following statements:
3232

3333

3434
```objective-c
3535
#import "AppDelegate.h"
3636

3737
...
3838

39-
// #import "RCTAppleHealthKit.h" // <-- Uncomment this line to use background observers
39+
/* Add the library import at the top of AppDelegate.m */
40+
#import "RCTAppleHealthKit.h"
4041

4142
...
4243

@@ -50,7 +51,8 @@ lines with a comment `Uncomment this line to use background observers`:
5051

5152
...
5253

53-
// [[RCTAppleHealthKit new] initializeBackgroundObservers:bridge]; // <-- Uncomment this line to use background observers
54+
/* Add Background initializer for HealthKit */
55+
[[RCTAppleHealthKit new] initializeBackgroundObservers:bridge];
5456

5557
...
5658

0 commit comments

Comments
 (0)