xcodefastlanefastfile

How to automate xcode clean process using fastlane Fastfile lane


I am looking for a way to automate xcode clean process using fastlate.

What I am looking to achieve:

  1. Clear Derived Data Folder
  2. Clean build folder
  3. Clean
  4. Build

So far I automated the derived data folder

lane :clean do
  clear_derived_data
end

Solution

  • You have achieve 1,2 and 3, but for 4, you need to use Gym It's easy to use, follow his guide https://docs.fastlane.tools/actions/gym/

    lane :cleanAndBuild do
      clear_derived_data
      gym( my_params )
    end