Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fastlane-plugin-ionic_conf

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fastlane-plugin-ionic_conf

  • 0.1.4
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

fastlane Plugin for Ionic CLI

fastlane Plugin Badge License Gem

This fastlane plugin helps you build your Ionic Cordova project via the ionic CLI.

It is based on fastlane-plugin-cordova (where it borrows a lot of its code. Thanks!).

Getting Started

This project is a fastlane plugin. To get started with fastlane-plugin-ionic, add it to your project by running:

fastlane add_plugin ionic

Actions

ionic

Runs ionic cordova build (technically: ionic cordova prepare first, then ionic cordova compile [which is the same as what build does internally]) to build your Ionic project.

ionic(
  platform: 'ios', # Build your iOS Ionic project
)
ionic(
  platform: 'android', # Build your Android Ionic project
  release: false # Build a "Debug" app
)

Examples

Lanes using these actions could look like this:

platform :ios do
  desc "Deploy ios app on the appstore"

  lane :deploy do
    match(type: "appstore")
    ionic(platform: 'ios')
    deliver(ipa: ENV['CORDOVA_IOS_RELEASE_BUILD_PATH'])
  end
end

platform :android do
  desc "Deploy android app on play store"

  lane :deploy do
    ionic(
      platform: 'android',
      keystore_path: './prod.keystore',
      keystore_alias: 'prod',
      keystore_password: 'password'
    )
    supply(apk: ENV['CORDOVA_ANDROID_RELEASE_BUILD_PATH'])
  end
end

with an Appfile such as

app_identifier "com.awesome.app"
apple_id "apple@id.com"
team_id "28323HT"

The ENV['CORDOVA_ANDROID_RELEASE_BUILD_PATH'] is only valid for cordova-android 7.x and newer (which you should be using anyway!).

If you're using Crosswalk (which oyu should not really be doing anymore), replace supply(apk: ENV['CORDOVA_ANDROID_RELEASE_BUILD_PATH']) (and equivalents) by:

supply(
  apk_paths: [
   'platforms/android/build/outputs/apk/android-armv7-release.apk',
   'platforms/android/build/outputs/apk/android-x86-release.apk'
  ],
)

Plugin API

To check what's available in the plugin, install it in a project and run at the root of the project:

fastlane actions ionic

Which will produce:

KeyDescriptionEnv VarDefault
platformPlatform to build on.
Should be either android or ios
CORDOVA_PLATFORM
releaseBuild for release if true,
or for debug if false
CORDOVA_RELEASEtrue
deviceBuild for deviceCORDOVA_DEVICEtrue
prodBuild for productionIONIC_PRODfalse
typeThis will determine what type of build is generated by Xcode.
Valid options are development, enterprise, adhoc, and appstore
CORDOVA_IOS_PACKAGE_TYPEappstore
team_idThe development team (Team ID) to use for code signingCORDOVA_IOS_TEAM_ID28323HT
provisioning_profileGUID of the provisioning profile to be used for signingCORDOVA_IOS_PROVISIONING_PROFILE
keystore_pathPath to the Keystore for AndroidCORDOVA_ANDROID_KEYSTORE_PATH
keystore_passwordAndroid Keystore passwordCORDOVA_ANDROID_KEYSTORE_PASSWORD
key_passwordAndroid Key password (default is keystore password)CORDOVA_ANDROID_KEY_PASSWORD
keystore_aliasAndroid Keystore aliasCORDOVA_ANDROID_KEYSTORE_ALIAS
build_numberSets the build number for iOS and version code for AndroidCORDOVA_BUILD_NUMBER
browserifySpecifies whether to browserify build or notCORDOVA_BROWSERIFYfalse
cordova_prepareSpecifies whether to run ionic cordova prepare before buildingCORDOVA_PREPAREtrue
min_sdk_versionOverrides the value of minSdkVersion set in AndroidManifest.xmlCORDOVA_ANDROID_MIN_SDK_VERSION''
cordova_no_fetchSpecifies whether to run ionic cordova platform add with --nofetch parameterCORDOVA_NO_FETCHfalse
build_flagAn array of Xcode buildFlag. Will be appended on compile command.CORDOVA_IOS_BUILD_FLAG[]
projectCall ionic cordova compile with --project=<Project> to specify project in multi-projects monorepo, the project is looked up by key in the projects objectCORDOVA_PROJECT
configurationCall ionic cordova compile with --configuration=<Configuration> to specify the configuration to use (for instance to manage environment in angular)CORDOVA_CONFIGURATION
cordova_build_config_fileCall ionic cordova compile with --buildConfig=<ConfigFile> to specify build config file pathCORDOVA_BUILD_CONFIG_FILE

Run tests for this plugin

To run both the tests, and code style validation, run

rake

To automatically fix many of the styling issues, use

rubocop -a

Issues and Feedback

For any other issues and feedback about this plugin, please submit it to this repository.

Troubleshooting

If you have trouble using plugins, check out the Plugins Troubleshooting doc in the main fastlane repo.

Using fastlane Plugins

For more information about how the fastlane plugin system works, check out the Plugins documentation.

About fastlane

fastlane is the easiest way to automate beta deployments and releases for your iOS and Android apps. To learn more, check out fastlane.tools.

FAQs

Package last updated on 14 Feb 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc