Skip to content

Commit 31276a7

Browse files
authored
docs: Mention BGTaskSchedulerPermittedIdentifiers plist key (#134)
Updating docs to mention BGTaskSchedulerPermittedIdentifiers plist key
1 parent b4d146d commit 31276a7

File tree

2 files changed

+24
-4
lines changed

2 files changed

+24
-4
lines changed

README.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,18 @@ If you will be making use of Geolocation or Push Notifications, enable `Location
2323

2424
![Configure Background Modes in Xcode](https://github.com/ionic-team/capacitor-background-runner/raw/main/docs/configure_background_modes.png)
2525

26+
You will also need to add the following entry into your `Info.plist` file:
27+
```
28+
<key>BGTaskSchedulerPermittedIdentifiers</key>
29+
<array>
30+
<string>com.example.background.task</string>
31+
</array>
32+
```
33+
34+
Read about [Configuring `Info.plist`](https://capacitorjs.com/docs/ios/configuration#configuring-infoplist) in the [iOS Guide](https://capacitorjs.com/docs/ios) for more information on setting iOS permissions in Xcode.
35+
36+
Make sure you use the same id that you use for `BGTaskSchedulerPermittedIdentifiers` (for example "com.example.background.task") in the `label` field in the plugin configuration.
37+
2638
After enabling the Background Modes capability, add the following to your app's `AppDelegate.swift`:
2739

2840
At the top of the file, under `import Capacitor` add:
@@ -65,8 +77,6 @@ Apple requires privacy descriptions to be specified in `Info.plist` for location
6577
- `NSLocationAlwaysUsageDescription` (`Privacy - Location Always Usage Description`)
6678
- `NSLocationWhenInUseUsageDescription` (`Privacy - Location When In Use Usage Description`)
6779

68-
Read about [Configuring `Info.plist`](https://capacitorjs.com/docs/ios/configuration#configuring-infoplist) in the [iOS Guide](https://capacitorjs.com/docs/ios) for more information on setting iOS permissions in Xcode
69-
7080
## Android
7181

7282
Insert the following line to `android/app/build.gradle`:

packages/capacitor-plugin/README.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,18 @@ If you will be making use of Geolocation or Push Notifications, enable `Location
2323

2424
![Configure Background Modes in Xcode](https://github.com/ionic-team/capacitor-background-runner/raw/main/docs/configure_background_modes.png)
2525

26+
You will also need to add the following entry into your `Info.plist` file:
27+
```
28+
<key>BGTaskSchedulerPermittedIdentifiers</key>
29+
<array>
30+
<string>com.example.background.task</string>
31+
</array>
32+
```
33+
34+
Read about [Configuring `Info.plist`](https://capacitorjs.com/docs/ios/configuration#configuring-infoplist) in the [iOS Guide](https://capacitorjs.com/docs/ios) for more information on setting iOS permissions in Xcode.
35+
36+
Make sure you use the same id that you use for `BGTaskSchedulerPermittedIdentifiers` (for example "com.example.background.task") in the `label` field in the plugin configuration.
37+
2638
After enabling the Background Modes capability, add the following to your app's `AppDelegate.swift`:
2739

2840
At the top of the file, under `import Capacitor` add:
@@ -65,8 +77,6 @@ Apple requires privacy descriptions to be specified in `Info.plist` for location
6577
- `NSLocationAlwaysUsageDescription` (`Privacy - Location Always Usage Description`)
6678
- `NSLocationWhenInUseUsageDescription` (`Privacy - Location When In Use Usage Description`)
6779

68-
Read about [Configuring `Info.plist`](https://capacitorjs.com/docs/ios/configuration#configuring-infoplist) in the [iOS Guide](https://capacitorjs.com/docs/ios) for more information on setting iOS permissions in Xcode
69-
7080
## Android
7181

7282
Insert the following line to `android/app/build.gradle`:

0 commit comments

Comments
 (0)