GithubHelp home page GithubHelp logo

fastlane-plugin-ionic's People

Contributors

almouro avatar am avatar blackholegalaxy avatar diegozuber avatar isair avatar janpio avatar jaydrogers avatar joshdholtz avatar laurentyhuel avatar muratcorlu avatar pimverlangen avatar randompoison avatar robingenz avatar spyros-uk avatar stalniy avatar vgsantoniazzi avatar weavemn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

fastlane-plugin-ionic's Issues

Is plugin support Ionic V4 ?

Hello,

Is plugin support Ionic V4 (and monorepo) ?

I have an application with Ionic V4 in monorepo (web + mobile).

In my monorepo, I go to my mobile project folder and run
fastlane init swift

[✔] 🚀
[✔] Looking for iOS and Android projects in current directory...
[17:33:34]: Created new folder './fastlane'.
[17:33:34]: It looks like there is no iOS project in the current directory, though we did find one in a sub-directory
[17:33:34]: Please cd into the directory of the intended Xcode project you wish to use.

[!] Please cd into the directory of the intended Xcode project you wish to use and run fastlane init again

ls platforms/ios/
image

ls platforms/android
image

ionic cordova resources command fails

I use ionic command to build my app with this parameters:

ionic(
      platform: 'ios',
      build_number: latest_build + 1,
      prod: true,
      release: true,
      device: true,
      cordova_prepare: true,
      build_flag: [
        "EMBEDDED_CONTENT_CONTAINS_SWIFT = YES",
        "ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES=NO",
        "LD_RUNPATH_SEARCH_PATHS = \"@executable_path/Frameworks\"",
        "-UseModernBuildSystem=0"
      ]
    )

But somehow this is calling ionic cordova resources command and it fails.

> ionic cordova resources ios --force
[ERROR] Source image files were not found for the following platforms/types:

        - ios/icon
        - ios/splash

Is this part of this plugin? Can I skip this step? Because I manage creating resources manually.

match + ionic results in provisioning profile error for some reason

My release lane looks something like this, but it ultimately fails with a code signing error (see below). The app gets built though, and if I fiddle around in xcode and change Signing (Release) then I can get xcode to build my app for release. But, why doesn't the ionic build command finish successfully? It seems like I've matched my app store profile right before building with ionic - so it should work?

Thanks!

(I'm using git_branch and team_id with match because I work across multiple development teams)

lane :release do
  match(
	type: 'appstore',
	git_branch: 'branch_name',
	app_identifier: "my.app.identifier",
	readonly: false,
	username: '[email protected]',
	team_id: 'my_team_id'
  )

  ionic(
	platform: 'ios',
	prod: true,
	release: true
  )
end

Error:

Code Signing Error: Provisioning profile "match AppStore my.app.identifier" doesn't include signing certificate "iPhone Developer: My NAME (ABCDEF1234)".

Add missing `ionic cordova build` CLI parameters

To evaluate and maybe add:

Option Description
--no-build Do not invoke an Ionic build
--aot Perform ahead-of-time compilation for this build
--minifyjs Minify JS for this build
--minifycss Minify CSS for this build
--optimizejs Perform JS optimizations for this build
--emulator Deploy Cordova build to an emulator
--buildConfig Use the specified Cordova build configuration

Already present:

Option Description
--debug Create a Cordova debug build
--release Create a Cordova release build
--device Deploy Cordova build to a device
--prod Build the application for production

Command CodeSign failed with a nonzero exit code

I'm running ionic(platform: 'ios') commant after a match(type: "appstore") but I'm getting a very long error message with the following ending:

CodeSign /var/root/Library/Developer/Xcode/DerivedData/MyApp-ccztmzoxngbmurbvfmxpessvdbbf/Build/Intermediates.noindex/ArchiveIntermediates/MyApp/InstallationBuildProductsLocation/Applications/MyApp.app (in target: MyApp)
    cd /Users/xcloud/workspace/DCIOSApp_DummApp/platforms/ios
    export CODESIGN_ALLOCATE=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate

Signing Identity:     "iPhone Distribution: ****"
Provisioning Profile: "match AppStore ***"
                      (****)

    /usr/bin/codesign --force --sign D4DC6C722544727A58C7449A285185812CAD815E --entitlements /var/root/Library/Developer/Xcode/DerivedData/MyApp-ccztmzoxngbmurbvfmxpessvdbbf/Build/Intermediates.noindex/ArchiveIntermediates/MyApp/IntermediateBuildFilesPath/MyApp.build/Release-iphoneos/MyApp.build/MyApp.app.xcent /var/root/Library/Developer/Xcode/DerivedData/MyApp-ccztmzoxngbmurbvfmxpessvdbbf/Build/Intermediates.noindex/ArchiveIntermediates/MyApp/InstallationBuildProductsLocation/Applications/MyApp.app
/var/root/Library/Developer/Xcode/DerivedData/MyApp-ccztmzoxngbmurbvfmxpessvdbbf/Build/Intermediates.noindex/ArchiveIntermediates/MyApp/InstallationBuildProductsLocation/Applications/MyApp.app: errSecInternalComponent
Command CodeSign failed with a nonzero exit code

** ARCHIVE FAILED **


The following build commands failed:
        CodeSign /var/root/Library/Developer/Xcode/DerivedData/MyApp-ccztmzoxngbmurbvfmxpessvdbbf/Build/Intermediates.noindex/ArchiveIntermediates/MyApp/InstallationBuildProductsLocation/Applications/MyApp.app
(1 failure)
xcodebuild: Command failed with exit code 65
[ERROR] An error occurred while running subprocess cordova.

        cordova compile ios --release --device --packageType=app-store --developmentTeam... exited with exit code 65.

The commant it's trying to run is this:

ionic cordova compile ios --no-interactive --release --device --prod -- --packageType=app-store --developmentTeam=**** --provisioningProfile=***

missing summary output?

Below is some output from calls to match and then ionic

Should the ionic command be showing summary output like match (and the rest of the fastlane commands)?

+---------------------+----------------------------------------+------------------------+
|                                               Installed Provisioning Profile          |
+---------------------+----------------------------------------+------------------------+
| Parameter           | Environment Variable                   | Value                  |
+---------------------+----------------------------------------+------------------------+
| App Identifier      |                                        | XXXXXXXXXXXXXXXXXXXXX  |
| Type                |                                        | XXXXXXXXXXXXXXXXXXXXX  |
| Platform            |                                        | XXXXXXXXXXXXXXXXXXXXX  |
| Profile UUID        | XXXXXXXXXXXXXXXXX                      | XXXXXXXXXXXXXXXXXXXXX  |
| Profile Name        | XXXXXXXXXXXXXXXXX                      | XXXXXXXXXXXXXXXXXXXXX  |
| Profile Path        | XXXXXXXXXXXXXXXXX                      | XXXXXXXXXXXXXXXXXXXXX  |
|                     |                                        | XXXXXXXXXXXXXXXXXXXXX  |
|                     |                                        | XXXXXXXXXXXXXXXXXXXXX  |
| Development Team ID | XXXXXXXXXXXXXXXXX                      | XXXXXXXXXXXXXXXXXXXXX  |
+---------------------+----------------------------------------+------------------------+

[09:28:19]: All required keys, certificates and provisioning profiles are installed 🙌
[09:28:19]: Setting Provisioning Profile type to 'app-store'
[09:28:19]: -------------------
[09:28:19]: --- Step: ionic ---
[09:28:19]: -------------------
[09:28:19]: $ ionic cordova prepare ios --no-interactive --release --device --prod

How to upload to testflight?

I fixed with:

lane :deploy_testflight do
    match(type: "appstore")
    ionic(
      platform: "ios",
      prod: true,
      release: true,
      type: "appstore",
    )
    testflight(
      ipa: ENV["CORDOVA_IOS_RELEASE_BUILD_PATH"],
      skip_waiting_for_build_processing: true,
    )
  end

"Reuse" SharedValues for APK and IPA path

Actions like hockey are using SharedValues::GRADLE_APK_OUTPUT_PATH or SharedValues::IPA_OUTPUT_PATH so you don't have to explicitly set the APK path:

https://github.com/fastlane/fastlane/blob/master/fastlane/lib/fastlane/actions/hockey.rb#L185
https://github.com/fastlane/fastlane/blob/master/fastlane/lib/fastlane/actions/hockey.rb#L204

This plugin could also set these values when a build succeeded additionally to its own variables so hockey and similar actions also don't need to manually get the path.

How to add specific parameter to ionic

In my package.json, I have multiple scripts to build Android (and iOS) to choose my angular environment file

My package.json:

"foo-mobile:android-build-int": "ionic cordova build android --prod --release --configuration=integration-cordova",
"foo-mobile:android-build-int-api": "ionic cordova build android --prod --release --configuration=integration-cordova-api",
"foo-mobile:android-build-qua": "ionic cordova build android --prod --release --configuration=qualif-cordova",
"foo-mobile:android-build": "ionic cordova build android --prod --release --configuration=production-cordova",

My angular.json:

        "qualif-cordova": {
          "fileReplacements": [
            {
              "replace": "foo-mobile/src/environments/environment.ts",
              "with": "foo-mobile/src/environments/environment.qua.ts"
            }
          ],

How to pass specific parameters with Fastfile ?

My Fastfile:

platform :android do
  desc "Build beta"
  lane :beta do
    ionic(
      platform: 'android',
      #prod: true,
      release: true,

cordovaNoFetch option broken

Perhaps the master branch is broken, so I just wanted to let you know before cutting a release. I created a fork and I got this when running the fastlane command as

    ionic(
      platform: 'ios',
      type: 'adhoc'
    )

So we get this stack trace

[12:58:11]: fastlane finished with errors
  |  
  | Looking for related GitHub issues on fastlane/fastlane...
  |  
  | Found no similar issues. To create a new issue, please visit:
  | https://github.com/fastlane/fastlane/issues/new
  | Run `fastlane env` to append the fastlane environment to your issue
  | bundler: failed to load command: fastlane (/Users/semaphore/loadup-driver-ionic/vendor/bundle/ruby/2.5.0/bin/fastlane)
  | NoMethodError: [!] undefined method `shellescape' for false:FalseClass
  | /Users/semaphore/loadup-driver-ionic/vendor/bundle/ruby/2.5.0/bundler/gems/fastlane-plugin-ionic-45ebb637570f/lib/fastlane/plugin/ionic/actions/ionic_action.rb:45:in `block in get_platform_args'
  | /Users/semaphore/loadup-driver-ionic/vendor/bundle/ruby/2.5.0/bundler/gems/fastlane-plugin-ionic-45ebb637570f/lib/fastlane/plugin/ionic/actions/ionic_action.rb:32:in `each'
  | /Users/semaphore/loadup-driver-ionic/vendor/bundle/ruby/2.5.0/bundler/gems/fastlane-plugin-ionic-45ebb637570f/lib/fastlane/plugin/ionic/actions/ionic_action.rb:32:in `get_platform_args'
  | /Users/semaphore/loadup-driver-ionic/vendor/bundle/ruby/2.5.0/bundler/gems/fastlane-plugin-ionic-45ebb637570f/lib/fastlane/plugin/ionic/actions/ionic_action.rb:58:in `get_android_args'
  | /Users/semaphore/loadup-driver-ionic/vendor/bundle/ruby/2.5.0/bundler/gems/fastlane-plugin-ionic-45ebb637570f/lib/fastlane/plugin/ionic/actions/ionic_action.rb:122:in `build'
  | /Users/semaphore/loadup-driver-ionic/vendor/bundle/ruby/2.5.0/bundler/gems/fastlane-plugin-ionic-45ebb637570f/lib/fastlane/plugin/ionic/actions/ionic_action.rb:163:in `run'
  | /Users/semaphore/loadup-driver-ionic/vendor/bundle/ruby/2.5.0/gems/fastlane-2.125.2/fastlane/lib/fastlane/runner.rb:256:in `block (2 levels) in execute_action'
  | /Users/semaphore/loadup-driver-ionic/vendor/bundle/ruby/2.5.0/gems/fastlane-2.125.2/fastlane/lib/fastlane/actions/actions_helper.rb:50:in `execute_action'
  | /Users/semaphore/loadup-driver-ionic/vendor/bundle/ruby/2.5.0/gems/fastlane-2.125.2/fastlane/lib/fastlane/runner.rb:235:in `block in execute_action'
  | /Users/semaphore/loadup-driver-ionic/vendor/bundle/ruby/2.5.0/gems/fastlane-2.125.2/fastlane/lib/fastlane/runner.rb:227:in `chdir'
  | /Users/semaphore/loadup-driver-ionic/vendor/bundle/ruby/2.5.0/gems/fastlane-2.125.2/fastlane/lib/fastlane/runner.rb:227:in `execute_action'
  | /Users/semaphore/loadup-driver-ionic/vendor/bundle/ruby/2.5.0/gems/fastlane-2.125.2/fastlane/lib/fastlane/runner.rb:157:in `trigger_action_by_name'
  | /Users/semaphore/loadup-driver-ionic/vendor/bundle/ruby/2.5.0/gems/fastlane-2.125.2/fastlane/lib/fastlane/fast_file.rb:154:in `method_missing'
  | Fastfile:32:in `block (2 levels) in parsing_binding'
  | /Users/semaphore/loadup-driver-ionic/vendor/bundle/ruby/2.5.0/gems/fastlane-2.125.2/fastlane/lib/fastlane/lane.rb:33:in `call'
  | /Users/semaphore/loadup-driver-ionic/vendor/bundle/ruby/2.5.0/gems/fastlane-2.125.2/fastlane/lib/fastlane/runner.rb:49:in `block in execute'
  | /Users/semaphore/loadup-driver-ionic/vendor/bundle/ruby/2.5.0/gems/fastlane-2.125.2/fastlane/lib/fastlane/runner.rb:45:in `chdir'
  | /Users/semaphore/loadup-driver-ionic/vendor/bundle/ruby/2.5.0/gems/fastlane-2.125.2/fastlane/lib/fastlane/runner.rb:45:in `execute'
  | /Users/semaphore/loadup-driver-ionic/vendor/bundle/ruby/2.5.0/gems/fastlane-2.125.2/fastlane/lib/fastlane/lane_manager.rb:56:in `cruise_lane'
  | /Users/semaphore/loadup-driver-ionic/vendor/bundle/ruby/2.5.0/gems/fastlane-2.125.2/fastlane/lib/fastlane/command_line_handler.rb:36:in `handle'
  | /Users/semaphore/loadup-driver-ionic/vendor/bundle/ruby/2.5.0/gems/fastlane-2.125.2/fastlane/lib/fastlane/commands_generator.rb:108:in `block (2 levels) in run'
  | /Users/semaphore/loadup-driver-ionic/vendor/bundle/ruby/2.5.0/gems/commander-fastlane-4.4.6/lib/commander/command.rb:178:in `call'
  | /Users/semaphore/loadup-driver-ionic/vendor/bundle/ruby/2.5.0/gems/commander-fastlane-4.4.6/lib/commander/command.rb:153:in `run'
  | /Users/semaphore/loadup-driver-ionic/vendor/bundle/ruby/2.5.0/gems/commander-fastlane-4.4.6/lib/commander/runner.rb:476:in `run_active_command'
  | /Users/semaphore/loadup-driver-ionic/vendor/bundle/ruby/2.5.0/gems/fastlane-2.125.2/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:76:in `run!'
  | /Users/semaphore/loadup-driver-ionic/vendor/bundle/ruby/2.5.0/gems/commander-fastlane-4.4.6/lib/commander/delegates.rb:15:in `run!'
  | /Users/semaphore/loadup-driver-ionic/vendor/bundle/ruby/2.5.0/gems/fastlane-2.125.2/fastlane/lib/fastlane/commands_generator.rb:333:in `run'
  | /Users/semaphore/loadup-driver-ionic/vendor/bundle/ruby/2.5.0/gems/fastlane-2.125.2/fastlane/lib/fastlane/commands_generator.rb:41:in `start'
  | /Users/semaphore/loadup-driver-ionic/vendor/bundle/ruby/2.5.0/gems/fastlane-2.125.2/fastlane/lib/fastlane/cli_tools_distributor.rb:119:in `take_off'
  | /Users/semaphore/loadup-driver-ionic/vendor/bundle/ruby/2.5.0/gems/fastlane-2.125.2/bin/fastlane:23:in `<top (required)>'
  | /Users/semaphore/loadup-driver-ionic/vendor/bundle/ruby/2.5.0/bin/fastlane:23:in `load'
  | /Users/semaphore/loadup-driver-ionic/vendor/bundle/ruby/2.5.0/bin/fastlane:23:in `<top (required)>'
  | exit code: 1 duration: 3s
 

It's failing here. We don't set any fetch policy but the params is cordovaNoFetch with a value of false. This shouldn't really execute but false to string is actually "false", which is truthy. However, you can't do false.shellescape, so it errors.

Lane Continues Running After Build Failure

I'm getting a build error for my android build that has something to do with a gradle configuration. The troubling thing about this is that the plugin doesn't report it.

begin
   ionic(
     platform: 'android',
      keystore_path: ENV['ANDROID_KEYSTORE_PATH'],
      keystore_alias: ENV['ANDROID_KEYSTORE_ALIAS'],
      keystore_password: ENV['ANDROID_KEYSTORE_PASSWORD'],
    )
rescue
  puts "Ionic build failed"
end

When this runs I get an error

[14:03:45]: ▸ BUILD FAILED in 2s
[14:03:45]: ▸ at ChildProcess.whenDone (/path/platforms/android/cordova/node_modules/cordova-common/src/superspawn.js:169:23)
[14:03:45]: ▸ at emitTwo (events.js:126:13)
[14:03:46]: ▸ at ChildProcess.emit (events.js:214:7)
[14:03:46]: ▸ at maybeClose (internal/child_process.js:925:16)
[14:03:46]: ▸ at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)

When that build error happens, the "Ionic build failed" message is never displayed. So I'm assuming the rescue block is never run. How do I account for a build failure and stop executing my lane?

Couple --release|--debug and type/packageType=development|app-store

We have --packageType (valid values: development, enterprise, ad-hoc, app-store) that "will determine what type of build is generated by Xcode".
And we have --release and --debug which defines the general build type.

  1. Does it ever make sense to use --release with development?
  2. Does it ever make sense to use --debug with anything but development?
  3. Would --debug => development and --release => app-store be a sensible default here?

Re 1) Not really.
Re 2) Not really.
Re 3) Maybe. debug=development yes, release could also be ad-hoc depending on usecase.

So at least in this plugin here we could couple these together with useful defaults.

To investigate: Is it maybe a problem when we always add a packageType?

source maps env variable?

    ionic(
      team_id: options[:team_id],
      platform: 'ios',
      prod: true,
      release: true
    )

seems like it produces this command:

ionic cordova prepare ios --release --device --prod

How do I get it to execute with: IONIC_GENERATE_SOURCE_MAP=true which forces ionic to generate sourcemaps.

Fix version

Currently the installed plugin is reported as "0.3.4" which is clearly wrong.

Allow to add --quiet flag to ionic commands

Hello, I'd like to request to add the option to add the --quiet option to the ionic commands. The ionic cordova compile ios commands is generating many 1000s of lines and crashed the gitlab CI runner due to huge logs of the job.
Thank you.

Add --verbose for `ionic cordova compile`

If a command fails, verbose would be useful to see the details:

[ERROR] An error occurred while running subprocess cordova.
        
        cordova compile ios --release --device --packageType=app-store --developmentTeam... exited with exit code 1.
        
        Re-running this command with the --verbose flag may provide more information.

readme states it executes 'cordova build' but actually executes 'cordova prepare' and 'cordova compile'

See README: This fastlane plugin helps you build your Ionic Cordova project via the ionic CLI and its ionic cordova build command.

See code: https://github.com/ionic-zone/fastlane-plugin-ionic/blob/master/lib/fastlane/plugin/ionic/actions/ionic_action.rb#L89-L109

This is a problem because cordova's build.json is ignored by those two commands which has uses, like setting build flags:
apache/cordova-ios#407

Can't sign APK

Hello,

I'm trying to generate an apk to upload it to the beta of Google Play, but the plugin is not signing it. What can happen?

I'm using version 0.0.3.

This is my config:

lane :deployBeta do
  ionic(
    platform: 'android',
    release: true,
    prod: true,
    device: false,

    keystore_path: './keystore.jks',
    key_password: '*********',
    keystore_alias: 'release',
    keystore_password: '*********',

    build_number: 3,
    cordova_prepare: true
  )
  supply(
    track: 'beta',
    apk: ENV['CORDOVA_ANDROID_RELEASE_BUILD_PATH']
   )
end

Thank you

Add `--prod`

Option Description
--prod Build the application for production

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.