Skip to content

Commit c19fd86

Browse files
committed
Cleanup expo plugin code / docs
1 parent e621fe5 commit c19fd86

File tree

12 files changed

+825
-855
lines changed

12 files changed

+825
-855
lines changed

.eslintignore

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
.eslintrc.js
2+
23
dist/
4+
node_modules
35
example/
46
scripts/
7+
8+
app.plugin.js
59
fetchWindowsCapabilites.js
610
mock.js
7-
node_modules
811
react-native.config.js
9-
app.plugin.js

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ body:
1818
label: Before submitting a new issue
1919
description: Please perform simple checks first.
2020
options:
21-
- label: I tested using the latest release of the library, as maybe the bug has been already fixed.
22-
required: true
23-
- label: I checked for possible duplicate issues, with possible answers.
24-
required: true
21+
- label: I tested using the latest release of the library, as maybe the bug has been already fixed.
22+
required: true
23+
- label: I checked for possible duplicate issues, with possible answers.
24+
required: true
2525
- type: textarea
2626
id: summary
2727
attributes:
@@ -36,7 +36,7 @@ body:
3636
attributes:
3737
label: Library version
3838
description: What version of the library are you using?
39-
placeholder: "x.x.x"
39+
placeholder: 'x.x.x'
4040
validations:
4141
required: true
4242
- type: textarea

README.md

Lines changed: 31 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -92,26 +92,51 @@ setup_permissions([
9292
#
9393
```
9494

95-
3. Then execute `pod install` _(📌  Note that it must be re-executed each time you update this config)_.
95+
<details>
96+
<summary><b>🧩 For expo users, see the plugin instructions</b></summary>
9697

97-
Tip: If you use Expo and Expo CNG (Continuous Native Generation), you can utilize the built-in Expo Config plugin to perform the work outlined in steps 1 & 2 for you (supported on React Native 0.72+).
98-
To use the plugin, simply specify the array of the permissions which you want to set up as outlined in step 2 - for example:
98+
If you use expo you can use the built-in expo config plugin to perform the work outlined in steps 1 and 2:
9999

100100
```json
101101
{
102-
"name": "my app",
102+
"name": "My awesome app",
103103
"plugins": [
104104
[
105105
"react-native-permissions",
106106
{
107-
// ...
108-
"iosPermissions": ["Bluetooth"]
107+
// uncomment wanted permissions
108+
"iosPermissions": [
109+
// "AppTrackingTransparency",
110+
// "Bluetooth"
111+
// "Calendars",
112+
// "CalendarsWriteOnly",
113+
// "Camera",
114+
// "Contacts",
115+
// "FaceID",
116+
// "LocationAccuracy",
117+
// "LocationAlways",
118+
// "LocationWhenInUse",
119+
// "MediaLibrary",
120+
// "Microphone",
121+
// "Motion",
122+
// "Notifications",
123+
// "PhotoLibrary",
124+
// "PhotoLibraryAddOnly",
125+
// "Reminders",
126+
// "Siri",
127+
// "SpeechRecognition",
128+
// "StoreKit"
129+
]
109130
}
110131
]
111132
]
112133
}
113134
```
114135

136+
</details>
137+
138+
3. Then execute `pod install` _(📌  Note that it must be re-executed each time you update this config)_.
139+
115140
4. Finally, update your `Info.plist` with the wanted permissions usage descriptions:
116141

117142
```xml

app.plugin.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
module.exports = require('./dist/commonjs/expo-plugin/index');
1+
module.exports = require('./dist/commonjs/expo');

example/ios/Podfile.lock

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,9 @@ PODS:
6868
- FlipperKit/FlipperKitNetworkPlugin
6969
- fmt (6.2.1)
7070
- glog (0.3.5)
71-
- hermes-engine (0.73.1):
72-
- hermes-engine/Pre-built (= 0.73.1)
73-
- hermes-engine/Pre-built (0.73.1)
71+
- hermes-engine (0.73.2):
72+
- hermes-engine/Pre-built (= 0.73.2)
73+
- hermes-engine/Pre-built (0.73.2)
7474
- libevent (2.1.12)
7575
- OpenSSL-Universal (1.1.1100)
7676
- RCT-Folly (2022.05.16.00):
@@ -1322,7 +1322,7 @@ EXTERNAL SOURCES:
13221322
:path: "../node_modules/react-native/ReactCommon/yoga"
13231323

13241324
SPEC CHECKSUMS:
1325-
boost: 26fad476bfa736552bbfa698a06cc530475c1505
1325+
boost: d3f49c53809116a5d38da093a8aa78bf551aed09
13261326
CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99
13271327
DoubleConversion: fea03f2699887d960129cc54bba7e52542b6f953
13281328
FBLazyVector: fbc4957d9aa695250b55d879c1d86f79d7e69ab4
@@ -1337,7 +1337,7 @@ SPEC CHECKSUMS:
13371337
FlipperKit: 37525a5d056ef9b93d1578e04bc3ea1de940094f
13381338
fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9
13391339
glog: c5d68082e772fa1c511173d6b30a9de2c05a69a2
1340-
hermes-engine: 34df9d5034e90bd9bf1505e1ca198760373935af
1340+
hermes-engine: b361c9ef5ef3cda53f66e195599b47e1f84ffa35
13411341
libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913
13421342
OpenSSL-Universal: ebc357f1e6bc71fa463ccb2fe676756aff50e88c
13431343
RCT-Folly: 7169b2b1c44399c76a47b5deaaba715eeeb476c0

example/tsconfig.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@
2222
"noUnusedParameters": true,
2323

2424
"paths": {
25-
"react-native-permissions": ["../src"]
26-
}
25+
"react-native-permissions": ["../src"],
26+
},
2727
},
2828
"include": ["src"],
29-
"exclude": ["node_modules", "babel.config.js", "metro.config.js"]
29+
"exclude": ["node_modules", "babel.config.js", "metro.config.js"],
3030
}

0 commit comments

Comments
 (0)