lib/gym/xcodebuild_fixes/swift_fix.rb in gym-0.5.0 vs lib/gym/xcodebuild_fixes/swift_fix.rb in gym-0.6.0

- old
+ new

@@ -1,5 +1,9 @@ +# encoding: utf-8 +# from http://stackoverflow.com/a/9857493/445598 +# because of +# `incompatible encoding regexp match (UTF-8 regexp with ASCII-8BIT string) (Encoding::CompatibilityError)` require 'zip' module Gym class XcodebuildFixes class << self @@ -21,10 +25,10 @@ Dir.mkdir(swift_support) ipa_swift_frameworks.each do |path| framework = File.basename(path) - FileUtils.copy_file("#{Gym.xcode_path}/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/#{framework}", File.join(swift_support, framework)) + FileUtils.copy_file("#{Xcode.xcode_path}/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/#{framework}", File.join(swift_support, framework)) end # Add "SwiftSupport" to the .ipa archive Dir.chdir(tmpdir) do command_parts = ["zip --recurse-paths '#{PackageCommandGenerator.ipa_path}' SwiftSupport"]