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 2323 " node"
2424 ]
2525 },
26- "iosPermissions " : [
26+ "reactNativePermissionsIOS " : [
2727 " AppTrackingTransparency" ,
2828 " BluetoothPeripheral" ,
2929 " Calendars" ,
Original file line number Diff line number Diff line change @@ -3,6 +3,8 @@ const fs = require('fs/promises');
33const path = require ( 'path' ) ;
44const pc = require ( 'picocolors' ) ;
55
6+ const CONFIG_KEY = 'reactNativePermissionsIOS' ;
7+
68const log = {
79 error : ( text ) => console . log ( pc . red ( text ) ) ,
810 warning : ( text ) => console . log ( pc . yellow ( text ) ) ,
@@ -15,12 +17,12 @@ module.exports = {
1517 description :
1618 'Update react-native-permissions podspec to link additional permission handlers.' ,
1719 func : async ( ) => {
18- const explorer = await cosmiconfig ( 'iosPermissions' ) ;
20+ const explorer = await cosmiconfig ( CONFIG_KEY ) ;
1921 const result = await explorer . search ( ) ;
2022
2123 if ( ! result ) {
2224 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.` ,
2426 ) ;
2527
2628 process . exit ( 1 ) ;
@@ -29,7 +31,7 @@ module.exports = {
2931 const { config} = result ;
3032
3133 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.` ) ;
3335 process . exit ( 1 ) ;
3436 }
3537
You can’t perform that action at this time.
0 commit comments