@@ -40,6 +40,7 @@ export const install = async (toolbox: IgniteToolbox) => {
4040 const { red, yellow, bold, gray, cyan } = colors
4141 const isWindows = process . platform === "win32"
4242 const isMac = process . platform === "darwin"
43+ const reactNativeVersion = getReactNativeVersion ( toolbox )
4344
4445 if ( parameters . options [ "dry-run" ] ) return
4546
@@ -86,6 +87,18 @@ export const install = async (toolbox: IgniteToolbox) => {
8687
8788 let includeDetox = false
8889 if ( isMac && ! useExpo ) {
90+ const isCocoapodsInstalled = await system . which ( `pod` )
91+ if ( ! isCocoapodsInstalled && reactNativeVersion >= "0.60" ) {
92+ print . error ( `
93+ Error: Cocoapods is not installed, but is required for React Native
94+ 0.60 or later, when not using Expo.
95+
96+ More info here: https://reactnative.dev/docs/environment-setup
97+ And here: https://guides.cocoapods.org/using/getting-started.html
98+ ` )
99+ process . exit ( 1 )
100+ }
101+
89102 const askAboutDetox = parameters . options . detox === undefined
90103 includeDetox = askAboutDetox
91104 ? await prompt . confirm ( "Would you like to include Detox end-to-end tests?" )
@@ -121,7 +134,7 @@ export const install = async (toolbox: IgniteToolbox) => {
121134 } else {
122135 rnInstall = await reactNative . install ( {
123136 name,
124- version : getReactNativeVersion ( toolbox ) ,
137+ version : reactNativeVersion ,
125138 useNpm : ! ignite . useYarn ,
126139 } )
127140
0 commit comments