Sha256: baa7d7f827756a8454c92a1f9984ce37350988b996964b3d7482a3bdd0902d92

Contents?: true

Size: 702 Bytes

Versions: 4

Compression:

Stored size: 702 Bytes

Contents

include IosToolchain::Helpers

namespace :ios do
  desc 'Cleans the build & resets simulator'
  task :clean => [:'ios:clean:build']

  desc 'Cleans the build'
  namespace :clean do
    task :build do
      puts 'Cleaning...'

      clean_cmd = []
      clean_cmd << 'xcodebuild clean'
      clean_cmd << 'rm -rf build'
      system(clean_cmd.join("\n"))

      puts 'Done!'
    end

    desc 'Resets the simulator'
    task :simulator do
      puts 'Resetting simulator...'

      system("osascript -e 'tell application \"iOS Simulator\" to quit'") &&
      system("osascript -e 'tell application \"Simulator\" to quit'") &&
      system('xcrun simctl erase all')

      puts 'Done!'
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ios_toolchain-0.3.1 lib/ios_toolchain/tasks/ios/clean.rake
ios_toolchain-0.3.0 lib/ios_toolchain/tasks/ios/clean.rake
ios_toolchain-0.2.6 lib/ios_toolchain/tasks/ios/clean.rake
ios_toolchain-0.2.4 lib/ios_toolchain/tasks/ios/clean.rake