This is the “Too Long Didn’t Read” version of all the articles about Ionic and Fastlane: Just the commands, necessary input or checks to do.
ionic cordova platform add iosionic cordova platform add androidconfig.xml: Customize widget id and widget versionionic cordova prepareionic cordova resourcesbrew cask install fastlanefastlane --version to check if everything worksfastlane init
platforms/ios/FastlaneIonic.xcodeprojzone.ionic.fastlane
fastlane/
├── Appfile
├── Fastfile
└── actions/
Appfile:
ruby
[...]
json_key_file ""
package_name "zone.ionic.fastlane"
Add at the bottom of Fastfile:
```ruby
[…]
platform :android do
before_all do
# ENV["SLACK_URL"] = "https://hooks.slack.com/services/..."
end
desc "Runs all the tests"
lane :test do
gradle(task: "test")
end
desc "Submit a new Beta Build to Crashlytics Beta"
lane :beta do
gradle(task: "assembleRelease")
crashlytics
# sh "your_script.sh"
# You can also use other beta testing services here
end
desc "Deploy a new version to the Google Play"
lane :deploy do
gradle(task: "assembleRelease")
supply
end
# You can define as many lanes as you want
after_all do |lane|
# This block is called, only if the executed lane was successful
# slack(
# message: "Successfully deployed new App Update."
# )
end
error do |lane, exception|
# slack(
# message: exception.message,
# success: false
# )
end
end
```
google_play_key.json fileAppfile with the path to your file:
json_key_file "../google_play_key.json"
fastlane supply init --verbose to test
Fetching a new access token from Google... and then a error Google Api Error: applicationNotFound: No application was found for the given package namefastlane produce
Fastlane Ionic--release APKpackage_name now appears in application listfastlane deliver init fastlane
├── Appfile
├── Deliverfile
├── Fastfile
├── metadata
│ ├── copyright.txt
│ ├── en-US
│ │ ├── description.txt
│ │ ├── keywords.txt
│ │ ├── marketing_url.txt
│ │ ├── name.txt
│ │ ├── privacy_url.txt
│ │ ├── promotional_text.txt
│ │ ├── release_notes.txt
│ │ ├── subtitle.txt
│ │ └── support_url.txt
│ ├── primary_category.txt
│ ├── primary_first_sub_category.txt
│ ├── primary_second_sub_category.txt
│ ├── review_information
│ │ ├── demo_password.txt
│ │ ├── demo_user.txt
│ │ ├── email_address.txt
│ │ ├── first_name.txt
│ │ ├── last_name.txt
│ │ ├── notes.txt
│ │ └── phone_number.txt
│ ├── secondary_category.txt
│ ├── secondary_first_sub_category.txt
│ ├── secondary_second_sub_category.txt
│ └── trade_representative_contact_information
│ ├── address_line1.txt
│ ├── city_name.txt
│ ├── country.txt
│ ├── is_displayed_on_app_store.txt
│ ├── postal_code.txt
│ └── trade_name.txt
└── screenshots
└── README.txt
Deliverfilefastlane supply init metadata/android
└── en-US
├── full_description.txt
├── images
│ ├── phoneScreenshots
│ ├── sevenInchScreenshots
│ ├── tenInchScreenshots
│ ├── tvScreenshots
│ └── wearScreenshots
├── short_description.txt
├── title.txt
└── video.txt
fastlane/metadatafastlane deliver
fastlane/metadata/android
en-US/featureGraphic.png (1024x500px) and en-US/icon.png (512x512px)fastlane supply
fastlane match init
fastlane/
└── Matchfile
fastlane match nuke developmentfastlane match nuke distribution
fastlane match developmentfastlane match appstorefastlane match development --force_for_new_devicesfastlane match adhoc --force_for_new_devicesionic Fastlane pluginfastlane add_plugin ionic
Gemfile and Gemfile.lock listing the gemandroid block of Fastfile:
desc "Build Debug"
lane :build_debug do
ionic(
platform: 'android',
prod: true,
release: false
)
end
fastlane android build_debug to executeios block of Fastfile:
desc "Build Debug"
lane :build_debug do
match(type: 'development')
ionic(
platform: 'ios',
prod: true,
release: false,
type: 'development'
)
end
fastlane ios build_debug to executeandroid block of Fastfile:
lane :build_release do
ionic(
platform: 'android',
prod: true,
release: true,
keystore_path: '../FastlaneIonic.keystore',
keystore_password: 'xyz',
keystore_alias: 'FastlaneIonic',
key_password: 'xyz'
)
end
fastlane android build_release to executeios block of Fastfile:
desc "Build Release"
lane :build_release do
match(type: 'appstore')
ionic(
platform: 'ios',
prod: true,
release: true
)
end
fastlane ios build_release to execute