I've been getting mixed reviews recently on one of my apps so I've been working on a HTML5 phonegap replacement.
Do I just have to match the bundle ID up with the existing app?
I have tried to create a new app using the following command phonegap create "CSCS Revision" --id "<my bundle ID>" --name "<my app name>". However, I have a problem, <my bundle ID> contains a hyphen, and phonegap tells me that it's an invalid character, is there a way to override this?
The next thing I tried was creating the app and then changing the bundle ID. This seemed to work OK, but when I copied over the contents of my www directory from the other app it seems that some of the javascript files aren't included properly in the HTML.
I have one file called data.js that just has a big array in it, but it seems that the array can't be accessed in the newly created app despite it working in the other app which is a direct copy.
OK, so I was being a little slow on the uptake.
The way to get this submitted to Apple is to give it an id that is valid by phonegap in the command phonegap create "CSCS Revision" --id "<my bundle ID>" --name "<my app name>"
Add your javascript and html to the www directory, however unlike myself don't make a change before doing the copy that makes the javascript crash.
Run the command phonegap build ios. Then change the Bundle ID in the project settings. At this point you can then archive the project and submit it to the App Store.
One problem I had was missing icons. I like to use this website to make all of my icons of the required sizes. I then copied the icon portion of the config.xml file from this app into my config.xml and reran phonegap build ios (if you do this you'll have to change the bundle ID again in xcode before submitting to the store).
Related
I am making a Cordova app using Framework7 for iOS/Android. I'm trying to add the social sharing plugin and the barcode scanner plugin but the plugin functions can not be called. However when I made a Cordova app with plain HTML and JS (without Framework7) the plugins would work. Is there anything I have to modify on the Framework7 side to enable these Cordova plugins to work?
cordova.js file need not be there in your project root directory. Everytime you do a particular platform build, it gets automatically created in the platform build's project root directory.
For instance, if you build android platform using 'cordova build android' command, the cordova.js file will be generated under 'platforms\android\assets\www' folder. This js file is very much required to use any of the cordova plugins as it is the one which is responsible for triggering 'onDeviceReady' event once the cordova is ready and all plugins are loaded. You can also have a look at the generated file once to get more info on the same. Hope it helps.
So I am running Apache Cordova on Ubuntu trying to create a multi-platform hybrid application. So far I am done with the steps of:
Installing Codova
Assigning the Andoird Home, configuring the sdk and the avd
Being able to export the project on the browser and as an apk file
Testing the apk file and making sure it's working fine on a real device
After unzipping the mobile template written in (HTML/CSS/JS) into the application's directory and removing the default index.html to make sure the full files of the templates are functional, everything seem to be working fine.
The question is, is this normally how it should work? or is there something that I have to do within the cordova's app directory's default files (like the default index.html) in order to not miss with the installed cordova plugins like (camera, geolocation .... etc) ?
In other words, do I treat the cordova's app's www directory just like I treat a regular website files on a server, or are there other steps?
I am trying to set up an ipad app that relies on using javascript for part of its functionality. I need to have the files in a folder named javascript to have some code I am using work properly.
I have created a symlink from my javascript files into the folder I set up and have included the files in the copy bundle resources in the appropriate build phase.
My issue is that under that section xcode says the files are in javascript/...
So in theory everything should be in the right folder. However, in my code I am using
[NSBundle mainBundle] pathForResource: pathName ofType:nil]]
and it returns nil when I set the path to the file in the file path and name listed in xCode.
Is there something I am not doing right to the app to have to proper file path names?
I am using the ipad simulator and xCode 5
For files that are in a subdirectory of your app bundle, you want to use the method pathsForResourcesOfType:inDirectory:
I am trying to upload some code html and javascript code into phonegap to develop this app however when I update the files the program still runs the old code as to what was in the html file before. I have even started a new project and it will not change the old index.html image even though the code behind it is different. I'm really confused as to why this is and I was wondering what I could do to solve this. I even searched through the workspace index.html file and it is the correct file that I want in there but upon running it i am given the same your device is ready hello world. I checked the location of the files and everything is correct. It is very confusing. I am using eclipse by the way not phonegap build if that helps.
you need to build your project again.
cordova build android
But make sure you edit your files in www folder in parent folder.
Make sure you are updating the WWW file in the root Phonegap folder. Then you can run the command:
$ cordova build
or
$ phonegap build
I installed PhoneGap with nodejs, and I sent the create command to create a folder with the basic files needed for the first app. When I open the index.html file there is a script tag that points to a file called phonegap.js. The problem is that this does not exist in the folder, where is it? The app is running if built without that file or not?
That is my folder:
My object is to create a basic app working.
Thanks.
The file is created when you add a platform to your project (because its content is different for each platform)
For example, for an android project it should be in platforms/android/assets/www/phone gap.js.