The Ionic framework is pretty great stuff. I was able to successfully build an app with some Angular code I have been working on, but I can't find an answer to the simple question of how to rename the app that gets generated. The output app is always called HelloCordova and there doesn't seem to be any documentation on how to change the name of the app. If I start manually digging through the project directory replacing HelloCordova, I end up with an app that won't run. Surely, people have solved this before.
Edit: You want to change the config.xml file in your project's root directory.
The tag which is responsible for the app name is <name>.
look up the config documentation for more.
Updated
Change the name in config.xml (# project root) see the : documentation.
Execute this command : $ sudo ionic cordova platform remove ios
Check if the folder ios under platforms folder is deleted.
Execute this command : $ sudo ionic cordova platform add ios
If changing the name is not working for any reason delete entire platform folder and then
cordova platform add ios
ionic build ios
If your looking to change the iconic view name be sure to also update ionic.project
Yes, you just have to modify the config.xml. Find a "name" tag and put your required name between this tag.
The following steps will help you as it did to me.
Rename app name in config.xml
<name>Your_new_name</name>
ionic cordova plugin save
ionic cordova rm ios
ionic cordova add ios
ionic cordova plugin add --save cordova-plugin-facebook4 --variable APP_ID="my_app_id" --variable APP_NAME="my_app_name" --variable CHANNEL_NAME="master"
In the parent directory of the ionic project there is a config.xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<widget id="com.ionicframework.todo497320" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>CHANGE NAME HERE</name>
Note that the project name will be seen in various other places in the app, all these will be changed automatically when the app is built
In the parent directory of the ionic project there is a config.xml
CHANGE NAME HERE
If changing the name is not working for any reason delete entire platform folder and then
cordova platform add ios
ionic build ios
You should make this change in the config.xml found at the root of your project. For example you might have something like this:
***<widget id="com.ionicframework.exampleproject223738" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">***
Change the id to whatever you wish your package to be and it will work for the entire project, Android and iOS.
However, if you've already submitted to the app store with a package name, you cannot change the package name at this point. Not unless you want to submit a new project. Updates must be made with matching package names.
For ionic 4.5.0 the "ionic platform" command has been renamed and the following commands are not used anymore:
ionic platform remove ios
ionic platform add ios
Instead use:
ionic cordova platform add ios
ionic cordova platform remove ios
Note: ios or android depending on your case
Related
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?
The problem was that when I created the blank project, I used the defaults which now outputs an ionic 2 baby.
I did the following 2 changes to solve my problem.
create my app for version 1 by appending --type=ionic1 as follows:
ionic cordova start myapp -blank --type=ionic1
I also prefixed allmy 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.
hope it will help someone.
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?
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
i am just begginer in phonegap
i have to integrate facebook login in my phonegap app which fetches all the information of user and and his friends
after a hours of search on google i am unable to find a proper documented example
i meet with lots of plugin and example but unable to understand or getting error when executing so, can any one provide me the link or explain me for this
i am using android studio
i have installed ant, node.js , phonegap, android studio java.
for creating new phonegap project
i have done following steps
open node.js and type following commands
1. phonegap create example
2. cd example
3. phonegap build android
this creates a project folder example in my c drive with some folders named "hooks","paltform","plugins","www" and config.xml with package name"com.phonegap.example"
then i try to install facebook plugin by typing this cordova plugin add https //github.com/phonegap/phonegap-facebook-plugin --variable APP_ID="12344" --variable APP_NAME="xyz"
after this my system goes for a long batch process and comes with some error after 30-40 minutes i have attached a image of error
in facebook developer i have done following steps to make a new app registered app
1. add new app
2. then select platform android
3. skip and craete app id
4. enter captcha
5. add a display name
![error on command line][2]i didn't understand where i am doing wrong
i have found my mistake
it was in command line --
"cordova plugin add https //github.com/phonegap/phonegap-facebook-plugin --variable APP_ID="12344" --variable APP_NAME="xyz" "
**so i rectified it and change it to
cd myprojectfolder
and then
cordova plugin add https://github.com/phonegap/phonegap/phonegap-facebook-plugin --variable APP_ID="123456789" --variable APP_NAME="myFacebookApplication"**
it solves my problem
this tutorial help me a lot http://www.phonegaptutorial.com/integrate-facebook-into-your-phonegap-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