Skip to content

CLI parameters ignored (--appname and --id) #873

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jgw96 opened this issue Mar 28, 2016 · 12 comments
Closed

CLI parameters ignored (--appname and --id) #873

jgw96 opened this issue Mar 28, 2016 · 12 comments

Comments

@jgw96
Copy link
Contributor

jgw96 commented Mar 28, 2016

From @kelvindart on March 26, 2016 0:54

Short description of the problem:

Whenever I execute the following command, Ionic seems to ignore all parameters:

ionic start -a MyApp -i com.kelvindart.myapp -v --ts ionic2-myapp blank

A directory named "blank" is created which contains the Ionic app; the "tabs" starter template is used and it also ignores the app name and app Id (these are not copied to config.xml).

If I run (i.e. moving -v --ts to the end of the command):

ionic start -a MyApp -i com.kelvindart.myapp ionic2-myapp blank -v --ts

It does create a blank starter app in the folder named "ionic2-myapp", but app name and app Id are still ignored and the defaults are used in config.xml (i.e io.ionic.starter and V2 Test).

The parameters are also ignored if I exclude -v --ts too - so I do not believe this to be solely related to Ionic v2.

What behavior are you expecting?

I am expecting the ionic start process to use the supplied parameters and construct an app template using the app name, and app Id provided.

Steps to reproduce:

  1. Open Terminal
  2. Run both commands above.
  3. Observe config.xml and notice the app name and app Id are not copied.

Other information:
No errors are produced. Ionic just seems to incorrectly interpret the parameters provided in the wrong place.

Which Ionic Version? 2.0.0-beta.22

Run ionic info from terminal/cmd prompt:
Cordova CLI: 6.0.0
Gulp version: CLI version 3.9.1
Gulp local: Local version 3.9.1
Ionic Version: 2.0.0-beta.3
Ionic CLI Version: 2.0.0-beta.22
Ionic App Lib Version: 2.0.0-beta.12
ios-deploy version: 1.8.5
ios-sim version: 5.0.6
OS: Mac OS X El Capitan
Node Version: v5.9.1
Xcode version: Xcode 7.2.1 Build version 7C1002

Copied from original issue: ionic-team/ionic-framework#5946

@jgw96
Copy link
Contributor Author

jgw96 commented Mar 28, 2016

Hello! Thanks for opening an issue with us! As this issue is related more to the ionic-cli instead of the framework i will be moving this issue over there. Thanks again!

@jthoms1
Copy link
Contributor

jthoms1 commented Oct 28, 2016

Thanks for opening the issue. It seems that issue has been resolved. I am going to close this issue but please feel free to reopen another issue if this occurs again.

@jthoms1 jthoms1 closed this as completed Oct 28, 2016
@christophmegusta
Copy link

doesn't work for me too.

ionic start theapp blank --type=ionic1 --app-name='the app' --id="com.my.theapp"

config.xml do not reflect those parameters
though package.json does atleast respect the name.
whats bugging me that not even "ionic start -h" is offering option for id.

ionic info

cli packages: (/usr/local/lib/node_modules)

    @ionic/cli-utils  : 1.9.2
    ionic (Ionic CLI) : 3.9.2

local packages:

    Ionic Framework : ionic1 1.3.3

System:

    Node : v8.4.0
    npm  : 5.4.0 
    OS   : macOS Sierra

@kelvindart
Copy link

I've noticed they've removed the option to set the app ID from [email protected]. Not sure if this is a bug... I'll dig a bit deeper.

@christophmegusta
Copy link

well, not even the offered app-name option does work as expected.

whats the recommended way to change id and reflect those throughout the whole directory tree?

@kelvindart
Copy link

I've not tried using v1, but I think app name was working when I used it for v2 (I will confirm).

Re. changing it manually:

  1. Edit config.xml to update the ID at the top.
  2. Remove the platforms and plugins folder: sudo rm -r platforms plugins
  3. Run cordova prepare

The ID should now propagate and rebuild packages and plugins correctly.

@kelvindart
Copy link

Hmm having done a little bit of digging, it seems like --app-name is copied to ionic.config.json, but no further (ionic cordova prepare nor ionic build seem to copy it across, interestingly. However, Cordova will use the value in config.xml, so no wonder it's not working.

I indeed think this is a bug...

@imhoffd
Copy link
Contributor

imhoffd commented Sep 5, 2017

Hi all, --id would be a feature request for 3.x. --app-name not being copied to --app-name not working for config.xml can be tracked in #2413 and #2595.

@kelvindart
Copy link

Hey @dwieeb - thanks for confirming! Just curious, is there a reason --id was removed?

@imhoffd
Copy link
Contributor

imhoffd commented Sep 5, 2017

@kelvindart The CLI 3.x was a rewrite, a completely new codebase. I've been working to add back stuff that makes sense that I missed. I think --id makes sense, but it might be renamed to --bundle-id. I'm also not keen on its importance. Seems like a setting you'd change when you're close to releasing your app, not starting it.

@kelvindart
Copy link

@dwieeb agreed! Sounds like good logic... I can't think of a time you'd actually change the ID unless, perhaps, a major new launch under a new app store listing perhaps - even that's rare.

I agree with your note on importance, the current workaround is barely manual labour.

@christophmegusta
Copy link

our workflow is based on app templates, usually we create a new ionic project from start and copy files over there. Having id for start command would be nice, but the manual workaround is absolutely fine either. Would just be good if this would be documented somewhere.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants