lib/cocoapods-playgrounds/generate.rb in cocoapods-playgrounds-1.2.1 vs lib/cocoapods-playgrounds/generate.rb in cocoapods-playgrounds-1.2.2
- old
+ new
@@ -28,14 +28,19 @@
def self.template_dir
xcode = Pathname.new(`xcode-select -p`.strip)
xcode + TEMPLATE_DIR
end
+ def self.major_version
+ `xcodebuild -version`.split("\n").first.split(' ')[1].split('.').first.to_i
+ end
+
def self.platform_name(file)
file.downcase.sub(' ', '').to_sym
end
def self.dir_for_platform(platform)
+ platform = :macos if major_version == 8 && platform.to_sym == :osx
Dir.foreach(template_dir) do |file|
return (template_dir + file) if platform_name(file) == platform
end
end
end