It’s been a while since I developed in ionic ( 1 yr ). I think things have changed.
I used to be able to create a new blank template ionic project at a local folder on the mac and then replace its placeholder www folder with another project’s www folder. This used to work.
Now, replacing the www folder in that ionic blank project makes no difference when I run any of these commands
ionic serve
cordova build ios
cordova emulate ios
I keep seeing the “The world is your oyster
” message.
In fact, when I even renamed the local folder that was holding the entire ionic project, the cordova build ios
still has worked without any complaints.
Clearly, the code is running somewhere else.
I also notice this at the terminal prompt:
➜ vb git:(master)
Here the git:(master) thing is new to me. Could this be the culprit?
If so, how can I disassociate the github aspect so I can work on the local and quickly test the changes I will be making in the local www as easy as going cordova build ios
?
How do you create the project? Did you provide the --type=ionic1
parameter to create an Ionic v1 project? Otherwise you have an Ionic v2+ project where development happens in src
.
Also, use ionic cordova ...
commands instead of cordova
directly to make sure all the necessary things happen.
What is your ionic info
output?
I created it like this
ionic start vb blank
I guess that’s ended up as ionic 2!
the www, I’m bringing in is an ionic 1.
Should I do this instead?
ionic start vb blank --type=ionic1
Also, not sure what you mean by
Also, use ionic cordova … commands instead of cordova directly to make sure all the necessary things happen.
for exmaple, what should I say instead of the cordova build ios
?
Exactly, see more docs and example here: How to Create A New Application with Ionic Start for New Projects[quote=“halukkaramete, post:3, topic:97576”]
Also, not sure what you mean by
Also, use ionic cordova … commands instead of cordova directly to make sure all the necessary things happen.
for exmaple, what should I say instead of the cordova build ios?
[/quote]
In this case ionic cordova build ios
. This first does the Ionic stuff, then hands over to cordova build ios
internally. See docs here: Ionic Cordova Build for Android and iOS Platform Builds
1 Like
THANKS TO YOU SUJAN. the problem has been solved.
I did the following 2 changes:
- create the app for version 1 by appending
--type=ionic1
as follows:
ionic cordova start inapp -blank --type=ionic1
- prefixed all
cordova
commands with ionic
name space.
Now I can replace the www all day long and my ionic cordova build ios
& ionic cordova emulate ios
will comply.
1 Like
Problem solved as my prev post sums it up.
This is a follow up only.
What’s the difference between these 2 commands?
cordova plugin add some-plugin
ionic cordova plugin add some-plugin
Again, not much. ionic cordova plugin ...
just calls cordova plugin ...
on the inside. Docs at https://ionicframework.com/docs/cli/cordova/plugin/ say “Like running cordova plugin directly, but provides friendly checks.” - whatever that means. I would have to look at the code to see what it actually does.
If you are using Ionic, always use the ionic cordova
one to make sure that everything of the Ionic side is taken care of. The cordova
command is fully executed, so there can nothing be lost there.