Note for setting fastlane build app with multiple target in xcode
- Open terminal and go to fastlane folder, create env file for target.
touch .env.app1
- Open env file with text editor and add environment.
# Loaded from `fastlane <lane> --env app1`
SCHEME=App1 # target name
BUNDLE_ID=com.yourcompany.app1
METADATA=fastlane/metadata-app1
SCREENSHOTS=fastlane/screenshots-app1
Run command in terminal, replace metadata_path, screenshots_path and app_identifier to your owned.
- Download metadata
deliver download_metadata --metadata_path fastlane/metadata-app1 --app_identifier com.yourcompany.app1
- download screenshots
deliver download_screenshots --screenshots_path fastlane/screenshots-app1 --app_identifier com.yourcompany.app1
Open 'Fastfile' in text editor and change like this:
lane :release do options available
gym(scheme: ENV['SCHEME'],
workspace: "yourApp.xcworkspace",
export_method: "app-store",
include_bitcode: true)
deliver(force: true,
metadata_path: ENV['METADATA'],
screenshots_path: ENV['SCREENSHOTS'],
app_identifier: ENV['BUNDLE_ID'])
end
Using like this:
fastlane release --env app1