-
-
Notifications
You must be signed in to change notification settings - Fork 197
Create main target scheme before installing pods. #848
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Can one of the admins verify this patch? |
let pbxprojFilePath = path.join(this.platformData.projectRoot, this.$projectData.projectName + IOSProjectService.XCODE_PROJECT_EXT_NAME, "xcuserdata"); | ||
if(!this.$fs.exists(pbxprojFilePath).wait()) { | ||
this.$logger.info("Creating project scheme..."); | ||
let createScheme_rb = `echo \"require 'xcodeproj'; xcproj = Xcodeproj::Project.open('${this.$projectData.projectName}.xcodeproj'); xcproj.recreate_user_schemes; xcproj.save\" | ruby`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We use only camelCase for variables. Consider naming it something like createSchemeRubyScript
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've tested on a clean machine with only Xcode 6.4, node and nativescript installed. In my case, the following error was shown:
require "xcodeproj"
LoadError: cannot load such file -- xcodeproj
Do we need to install some additional dependencies?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we go ruby way, you can consider using the one-liners syntax: ruby -e "our code here"
, which will save us some nasty escaping.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The ruby gem cocoapods
depends on xcodeproj
so it is automatically installed. Do you have the latest cocoapods v.0.38.2
? Users can manually uninstall gem xcodeproj
. However doing so will cause a few lines down the execution of pod install
command to fail as well although there would be installed cocoapods
(with missing xcodeproj
). Here is a snippet of the error message:
`/Library/Ruby/Site/2.0.0/rubygems/dependency.rb:315:into_specs': Could not find 'xcodeproj' (~> 0.26.3) among 35 total gem(s) (Gem::LoadError)
Perhaps there should be a check for installed xcodeproj
gem as well. I've added it in the latest commit.
1a875b7
to
174185a
Compare
174185a
to
dd8708e
Compare
👍 |
Create main target scheme before installing pods.
Changes: Create
.xcscheme
for the main target before installing pods.Reason:
xcodebuild
fails to build workspaces without scheme in the main target.Addresses issue #831.