File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 23
23
" node"
24
24
]
25
25
},
26
- "iosPermissions " : [
26
+ "reactNativePermissionsIOS " : [
27
27
" AppTrackingTransparency" ,
28
28
" BluetoothPeripheral" ,
29
29
" Calendars" ,
Original file line number Diff line number Diff line change @@ -3,6 +3,8 @@ const fs = require('fs/promises');
3
3
const path = require ( 'path' ) ;
4
4
const pc = require ( 'picocolors' ) ;
5
5
6
+ const CONFIG_KEY = 'reactNativePermissionsIOS' ;
7
+
6
8
const log = {
7
9
error : ( text ) => console . log ( pc . red ( text ) ) ,
8
10
warning : ( text ) => console . log ( pc . yellow ( text ) ) ,
@@ -15,12 +17,12 @@ module.exports = {
15
17
description :
16
18
'Update react-native-permissions podspec to link additional permission handlers.' ,
17
19
func : async ( ) => {
18
- const explorer = await cosmiconfig ( 'iosPermissions' ) ;
20
+ const explorer = await cosmiconfig ( CONFIG_KEY ) ;
19
21
const result = await explorer . search ( ) ;
20
22
21
23
if ( ! result ) {
22
24
log . error (
23
- ' No config detected. In order to setup iOS permissions, you first need to add an "iosPermissions " array in your package.json.' ,
25
+ ` No config detected. In order to setup iOS permissions, you first need to add an "${ CONFIG_KEY } " array in your package.json.` ,
24
26
) ;
25
27
26
28
process . exit ( 1 ) ;
@@ -29,7 +31,7 @@ module.exports = {
29
31
const { config} = result ;
30
32
31
33
if ( ! Array . isArray ( config ) || config . length === 0 ) {
32
- log . error ( ' Invalid "iosPermissions " config detected. It must be a non-empty array.' ) ;
34
+ log . error ( ` Invalid "${ CONFIG_KEY } " config detected. It must be a non-empty array.` ) ;
33
35
process . exit ( 1 ) ;
34
36
}
35
37
You can’t perform that action at this time.
0 commit comments