How to create app file with fastlane for simulator

This is the lane that I use:

lane :generate_test_app do
    xcbuild(
        workspace: "MyApp.xcworkspace",
        scheme: "MyApp",
        configuration: "Debug",
        xcargs: "-sdk iphonesimulator SYMROOT='/var/tmp/'"
    )
end

It will leave the app in /var/tmp/Debug-iphonesimulator/MyApp.app

See also: How do I build my projects from the command line?


I've managed to do this with build_app:

build_app(
    scheme: scheme,
    workspace: workspace,
    configuration: build_configuration,
    derived_data_path: output_path,
    skip_package_ipa: true,
    skip_archive: true,
    destination: "generic/platform=iOS Simulator"
)

I think that you could base on that if you would like to use gym.