Ionic serve with '--platform ios' not work

From the help of ionic serve command, it mentioned about --platform option:

--platform, -t ........... Start serve with a specific platform (android, ios)

But I tried with ionic serve --platform ios
and also ionic serve -t ios, the serve still show in android theme.

Is this command really work? or already deprecated?

My info:

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

    @ionic/cli-utils  : 1.10.2
    ionic (Ionic CLI) : 3.10.3

local packages:

    @ionic/app-scripts : 2.1.4
    Ionic Framework    : ionic-angular 3.6.1

System:

    Node : v6.9.2
    npm  : 3.10.9 
    OS   : macOS Sierra

I just tested and it started as android for me as well. That said, I’ve never had a reason to use this method of serving. I use:

ionic serve -l

Then you can just select the platforms you want to use :slight_smile:
The ios selection works fine there.

3 Likes

Thank for suggestion, Beck. I have tried lab option, it’s good.

But sometime I found its just not respond to live-reload. I also found its less complicated in testing navigation with simple serve.

So if there’s a option there, I wonder why it isn’t work.

Doesn’t work for me either…
But if you add “ionicplatform=<platformname>” to your url (http://localhost:8100/?ionicplatform=ios) it works.

3 Likes

thank you, I didn’t know this query string exist! :smile: