Skip to content

Instantly share code, notes, and snippets.

@shanesmith
Created August 14, 2014 15:54
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shanesmith/8b88720c19b910cc9900 to your computer and use it in GitHub Desktop.
Save shanesmith/8b88720c19b910cc9900 to your computer and use it in GitHub Desktop.
Fix a Cordova-generated xcodproj not having any schemes defined
#!/usr/bin/env ruby
require 'xcodeproj'
path = ARGV.shift
xcproj = Xcodeproj::Project.open(path)
# Fix schemes not being defined
xcproj.recreate_user_schemes
xcproj.save
@escapedcat
Copy link

just for people who are not sure how to use this:
fix-xcodeproj.rb YOUR_PROJECT.xcodeproj

@aabluedragon
Copy link

Thanks shanesmith, saved hours of my life, well, after I have already wasted many of them until I realised why xcodebuild is stuck (warnings did not mention anything related at all, just some svn blabber).

Anyway, Thanks!

@TechGuyVN
Copy link

thanks, it's save my day 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment