diff --git a/README.md b/README.md index 3e85d8c1bf..6d719c423b 100644 --- a/README.md +++ b/README.md @@ -153,6 +153,7 @@ sudo ruby -e "$(curl -fsSL https://raw.githubusercontent.com/NativeScript/native * For iOS development * [Latest Xcode][12] * [Xcode command-line tools][12] + * [xcodeproj ruby gem][13] * (Optional) [CocoaPods 0.38.2][CocoaPods 0.38.2] * For Android development * [JDK 8][JDK 8] or a later stable official release @@ -601,6 +602,7 @@ This software is licensed under the Apache 2.0 license, quoted { return (() => { let result = false; - let sysInfo = this.$sysInfo.getSysInfo(path.join(__dirname, "..", "..", "package.json")).wait(); + let sysInfo = this.$sysInfo.getSysInfo(this.$staticConfig.pathToPackageJson).wait(); if (!sysInfo.adbVer) { this.$logger.warn("WARNING: adb from the Android SDK is not installed or is not configured properly."); @@ -64,6 +65,13 @@ class DoctorService implements IDoctorService { result = true; } + if (!sysInfo.xcodeprojGemLocation) { + this.$logger.warn("WARNING: xcodeproj gem is not installed or is not configured properly."); + this.$logger.out("You will not be able to build your projects for iOS." + EOL + + "To be able to build for iOS and run apps in the native emulator, verify that you have installed xcodeproj." + EOL); + result = true; + } + if (!sysInfo.cocoapodVer) { this.$logger.warn("WARNING: CocoaPods is not installed or is not configured properly."); this.$logger.out("You will not be able to build your projects for iOS if they contain plugin with CocoaPod file." + EOL diff --git a/setup/native-script.rb b/setup/native-script.rb index 2898d00af7..514074aa84 100644 --- a/setup/native-script.rb +++ b/setup/native-script.rb @@ -108,6 +108,7 @@ def install(program_name, message, script, run_as_root = false, show_all_option # the -p flag is set in order to ensure zero status code even if the directory exists execute("mkdir -p ~/.cocoapods", "There was a problem in creating ~/.cocoapods directory") +install("xcodeproj", "Installing xcodeproj... This might take some time, please, be patient.", 'gem install xcodeproj -V', true) install("CocoaPods", "Installing CocoaPods... This might take some time, please, be patient.", 'gem install cocoapods -V', true) puts "Configuring your system for Android development... This might take some time, please, be patient."