ionic cli - export project from 'Creator' not working - ionic-framework

I've created a test project using ionic creator. I've created a blank page, assigned a title and added a button.
I save the project and I'd like to export the project
Ionic Creator - Using CLI
When I use the Ionic CLI tool with the command
ionic start [appName] creator:[MY_ID]
It tries to download my project from the following URL:
https://apps.ionic.io/api/v1/creator/[MY_ID]/download/html
This returns an empty zip file. So my project doesn't get initialised.
Ionic Creator - ZIP Export
The ZIP file link in creator is the following URL:
https://creator.ionic.io/api/v1/creator/[MY_ID]/download/html
This does return a ZIP with what I expect in.
I have successfully checked out a project using the CLI ~2 weeks ago and can't see what I'm doing differently. I'd be interested to know if anyone else is experiencing this problem?
I've tried putting the ZIP file contents into the WWW folder and initialising that way but to no avail.
CLI version is 1.7.1
OS is Windows 7
I have updated both the CLI and Cordova to the latest version.
Any ideas?
Note: I've raised this as a GitHub issue too - https://github.com/driftyco/ionic-cli/issues/619

I've upgraded from 1.7.1 to 1.7.6 today and it's now working.
It's using the following URL now -
https://creator.ionic.io/api/v1/creator/[ID]/download-start/cordova?sid=[SID]

Related

How to automatically generate a page-name.module.ts?

So in the newest version of Ionic when we use the generate page command
ionic g page page-name
Ionic creates the page's directory containing the page-name.html, page-name.scss and page-name.ts. It does NOT automatically create the file page-name.module.ts needed for lazy loading and deep links feature.
My question is: Is there any way or any plugin that automatically creates that file for each new page (or for all the existing ones)? Or do we really need to create that file manually for each and every page we create for our project?
As i experience in ionic cli 3.5 while creating a page, the page module was not getting generated. but on ionic cli 3.6 it was generating. need to check on ionic 3.7 which is released today.

Can i run the ionic v1 project when i have ionic CLI 3.0.0

Now i have the latest version of ionic 3.0.0. My ionic version: 3.0.0.
And my ionic info:
global packages:
#ionic/cli-utils : 1.0.0
Ionic CLI : 3.0.0
System:
Node : v7.3.0
OS : macOS Sierra
Xcode : Xcode 8.3.2 Build version 8E2002
ios-deploy : 1.9.0
ios-sim : 5.0.13
Now i have two question in this. I searched , but not able to get the clear. If any one can answer. It will be helpful for many new bie like me.
So,
1.Now i have ionic 3.0.0. Then if i want to open the project in ionic v2. i will give ` ionic start newapp blank --v2 or (--ts_)'. And i will use some updated plugin having in ionic 3.0.0. Does it will work out. or i need to create a seperate project for ionic version 3 ??
Now i have old ionic 1 project that i am still working on. So once i update my ionic to3.0.0. Now what i done is :
ionic start newapp blank --v1 then i copied my old project www folder to this newapp and i replaced it.
My question is. Still can i use angular js1 to code for this project also. And while make ionic release means when i want to put it in my app store. Does any problem will occur. Because i have create this project as --v1.
If yes when i create a new project ionic start newapp blank --v1 its asking me Link this app to your Ionic Dashboard to use tools like Ionic View? y/N : what should i need to do
Please clarify me..thanks in advance
Using the ionic-cli version 3.0 you should be able to work on all versions of ionic projects.
The new cli will create an ionic v3 app by default. If you want to create an ionic v1 app, you need to add --v1. But if you are starting with a new app, I strongly recommend going for v2+.
Depending on the version your ionic app has, you need to add some additional plugins:
#ionic/cli-plugin-ionic-angular – Ionic Angular project plugin that provides useful build tools and generators. (ionic v2+)
#ionic/cli-plugin-ionic1 – Ionic 1 project plugin that has functionality ported from the old CLI.
#ionic/cli-plugin-cordova – Essential for an Ionic/Cordova app.
#ionic/cli-plugin-proxy – For proxying CLI requests through a firewall.
I can't tell you if you need to link your app to the dashboard. If you are using the Ionic services (Push, View, etc), then it makes sense.
That being said, I have experienced quite a few "bugs" or inconsistent behaviour with the new cli, so you might need to downgrade if something doesn't work.
I had this same worry when I updated my Ionic to v3 (CLI 3.1.2). They seem to really be pushing to use their cloud services (obviously, they want to start making some money on it).
When I tried the old v1 command:
ionic build ios
I received:
The build command has been renamed. To find out more, run:
ionic cordova build --help
So, then I tried
ionic covdova build ios
That failed with this:
ionic package build ios
[ERROR] Your project file (./ionic.config.json) does not contain 'app_id'. Run ionic link.
So, after looking around a bit, I used this command and it worked:
ionic cordova build ios --v1
It asked me to install a couple of things, then chugged out a new successful build. All good.
Please use following command as I had trouble with "--v1"
ionic start newapp blank --type=ionic1
As mentioned by #Samuel.
Add Ionic 1 CLI to the devDependency list. Open package.json file in the project directory and add the following line to devDependencies.
"#ionic/cli-framework": "^1.0.0-rc.2"
Example package.json:
Running ionic repair removed package.json and node_modules then, if prompted, run npm audit fix, and then you will be asked to Install #angular/cli?

Ionic downloads from github - can I avoid doing this with each new app?

I am new to Ionic and just getting used to it. However I have noticed that when I create an app files are download from github such as:
Downloading:
https://github.com/driftyco/ionic-app-base/archive/master.zip
Often working without internet access is there a way that files I might need can be downloaded once and stored locally?
Yes, you can avoid downloading it with each new app. When you wrote something like to
$ ionic start YourAppName tabs
tabs - is an alias to Ionic starter repository. You can replace with relative or absolute path to a local directory.
Check out more about start parameters there - Starting an Ionic App.
EDIT: I don't see a reason why the code below couldn't work. And Yes, you have to unpack your default app files to some folder.
$ ionic start YourAppName c:\Temp\ionic-app-base-master
The command ionic start myApp will always create your project with the latest version of Ionic. It will always download the github. Currently there is no how to create a new project without using the downlod of the github.
You can create a blank project and uses it as "boilerplate project" (ionic start myApp blank). Then, when necessary, to update the Ionic (newest version) go to the root of your project and run ionic lib update.
Just download all the templates once and use it whenever you need when you are offline. Ionic will always download latest bundle when you do:
ionic start MyApp

Where to get .xap file in Windows using ionic build?

I am using Ionic framework for my project. As per ionic build I have used the build command for windows:
ionic build windows
After the build I get the file structure as below:
The issue is I'm not able to figure out were do I get the .XAP file inside the platform/windows folder and I'm completely new on Windows build.
I'm just posting this as an answer, to which we came in the comments under the OP's question:
Add the windows phone platform: ionic platform add wp8.
Build for wp8: ionic build wp8.
The file CordovaAppProj_Debug_AnyCPU.xap is the one you're looking for.
However, I would like to turn your attention to these few posts:
http://blog.vjrantal.net/2015/01/08/experiences-with-ionic-on-windows-phone-8-1/
http://blogs.msdn.com/b/msdn_answers/archive/2015/02/10/running-cordova-apps-on-windows-and-windows-phone-8-1-using-ionic-angularjs-and-other-frameworks.aspx
http://appfoundry.be/blog/2014/10/16/ionic-windows-phone
which basically confirm what the official Ionic team says that the platforms wp8 and windows in general are not yet fully supported; but they hope they soon will be.

Error uploading ionic app

Background:
This app was originally uploaded to my personal ionic account
The app was deleted from my personal ionic account
This error happens when I try to upload the app with my work ionic account
My question is, how do I get the app to upload to my work account?
$ ionic upload
Uploading app...
✗ App ID ae440d8c does not exist
Unable to upload app (CLI v1.4.5)
Your system information:
Cordova CLI: 4.3.0
Ionic Version: 1.0.0-rc.2
Ionic CLI Version: 1.4.5
Ionic App Lib Version: 0.0.22
ios-deploy version: Not installed
ios-sim version: 3.1.1
OS: Mac OS X Yosemite
Node Version: v0.12.1
Xcode version: Xcode 6.3.1 Build version 6D1002
Log in at apps.ionic.io
Create a new App and specify the name of your App.
Copy the App ID to your clipboard for use in the next step.
In your terminal window ensure you're logged into the same account that you were logged into on app.ionic.io).
In your terminal window use command:
ionic link <copied-app-id>
Where <copied-app-id> is your own App ID copied to your clipboard in step 3.
In your terminal window use command:
ionic upload
Get it solved with Chirag thaker's suggestion:
Open ionic.project.json (if not exist find ionic.config.json) file
Set appId to blank (delete the existing appId)
run ionic upload again
I think this is because, your keys are now miss matching, so try
Create a new app in (ionic.io)
Get the app key and public key
Add those to your existing app in
app.js / .config section
$ionicAppProvider.identify({
app_id: 'APP_ID',
api_key: 'PUBLIC_KEY',
//gcm_id: 'YOUR_GCM_ID'
});
try uploading again
In folder root project run:
ionic io init
https://docs.ionic.io/setup.html
Even after reading everything it still looked confusing to me so re-producing here solution again so others can easily resolve it.
Here are the steps:
Login https://apps.ionic.io/apps and Create new App.
Replace your current App ID in your ionic.config.json file against app_id with the help of below screenshot.
Now run ionic upload, and you should no more see the error :)
I've had the same problem..
Sameera207 is almost correct but not quite for my case. ( I don't believe Ionic even looks in your angular JS files )
I think this is because, your ID does not yet exist in apps.ionic.io, so try
Create a new app in (ionic.io)
Get the app ID
replace the app IP to your existing app in
ionic.project file
{
"name": "YOUR_APP_NAME",
"app_id": "YOUR_APP_ID"
}
try uploading again
Also note, that sometimes ( not sure why and when ) the following command:
ionic package build android --release
is truncating the file:
.io-config.json
Making it empty, so it also prevent you from uploading your app again.
i just delete my ionic.project file and re-run ionic upload
To resolve
login to to you ionic.io and create an app in
https://apps.ionic.io/apps
Copy the new App Id
On you development system, go to your project folder and edit ionic.config.json. Update the "app_id" to new id that you copied in step 2. Save file.
From your ionic project run the command: ionic upload.
Remove .io-config.json from the build root; run ionic io init; then try to upload again.
You can reset the io-app-id with the following command then try uploading your app again
ionic link --reset
ionic upload