Anyone know the commands to make my d3.js directory a cordova project and then run it on a device? When using Sencha cmd I ran sencha cordova init com.mycompany.MyApp MyApp to create the project, then sencha app run native to run the app on my device. But what's the commands for d3.js?
Thanks,
You might be getting the concept wrong. sencha provides you a command line tool, that wraps cordova/phonegap commands and provides additional goodies. d3.js is a library and does not come with a command line tool such as sencha. What you need to do is use cordova/phonegap commands inside your d3.js directory to create/build and run the project on your device.
phonegap create my-app initializes project
phonegap local run android adds, builds and runs project on your android device.
For more details check the docs.
Related
I use Phonegap CLI to make my android apps every thing works fine, but when I want to make my final .apk I face a problem
I have SDK JDK Java and all environment variables
I generated my .keystore and when i run phonegap build --release i have no error my problem is this
there is no folder called bin or any .apk file in my folder
I red all documents and questions from stackoverflow and I still have this problem
what do you think? should i switch to cordova CLI ?
PhoneGap has been discontinued.
Switching to Cordova CLI is certainly an option, but many find that installing the build toolchain is a lot of trouble to get working (and keep working).
If you prefer the convenience of a build service like you had with PhoneGap, have a look at VoltBuilder, Ionic or Monaca.
I am trying to use the cordova-plugin-health plugin for a phonegap app I am working on. Whenever I use the app every plugin works but this one. I am using the phonegap mac app to test on an iPhone 6s.
Steps I have taken:
Installed plugin with cordova plugin add cordova-plugin-health --variable HEALTH_READ_PERMISSION='App needs read access' --variable HEALTH_WRITE_PERMISSION='App needs write access' also I did cordova platform add ios
Used navigator.health.requestAuthorization later on tried window.plugin.health.requestAuthorization my ide WebStorm was able to detect the second but not the first.
Is there anything I missed/can I use this plugin using the phonegap mac app?
Thanks!
Phonegap Developer App is a tool to easily preview your apps.
Phonegap Developer App is a Cordova app itself, that loads your app code from a local web server.
The thing about the Phonegap Developer App is, as it's a precompiled app, it can only run the plugins that were included on the Phonegap Developer App at the moment of the build.
That means, most 3rd party plugins (like the heathkit one) won't work as they are not included in the Phonegap Developer App.
What you can do is to run your app in your device instead of previewing it.
To do it, run, with the Phonegap CLI installed and your device plugged in:
phonegap run ios
If you have Cordova CLI installed, this should also work
cordova run ios.
I am planning to develop hybrid application for Android and iOS using Angular,Phonegap etc.
My main query is how to maintain single code base for iOS/Android?
Q1:I execute cordova create command to create project for Android. and write one Hello World App.Do I need to do create project again in iOS and copy www?
Q2: How about maintaining single code in git ? I am confused since folder structure are different for Android and iOS ?
Any help is appreciated.
I have searched many blogs but didn't find the this concepts.
Just develop your code under project/www
cordova platform add android
cordova platform add ios
Will create both platforms, and with cordova prepare, and cordova build, it will copy the files to each platform
To maintain code, just add your project into a GIT, and both platforms project/platforms/[IOS/android] will be in the same project. You can also gitignore the platforms if you want to maintain light your project
I´m starting with sencha touch 2 tech,and now I´m stuck in creating the .apk file.
This is what I have done since the begining to where I´m stuck:
Download Sencha Touch SDK
Install Java JDK
Install NodeJS
Install Ruby
Install Sencha CMD
After that I created my app:
In the command line --> sencha generate app MY_APP_NAME MY_APP_FOLDER(I use the folder www of my wamp server)
Then with Eclipse for PHP Developers,I opened the folder and start editing the files to create my app.
Now I have finished my app and want to create the .apk file to test it in a real device(in my wamp server runs perfect).
And I´m stuck on how to create the apk file,I have read lots of tutorials but no one is clear.
Please some help on how to create the .apk file step by step or something helpfull.
Thanks.
Create Simple Android Project in Eclipse and put your www folder in assets folder.
And write below code in your MainActivity:
#Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
super.loadUrl("file:///android_asset/www/index.html");
}
Now simply run your Application.
For creating apk files, you can create and setup Cordova environment as described here.
For some additional help, see this reference.
Once you want to make apk for your android device. Just go through the steps here. But i will advice you to use build of your app to work with in your cordova app.
After making build of your project, Check the following steps:
cordova create yourapp com.example.yourapp YourApp
cd yourapp
cordova platform add android
cordova build android
After this you should copy your project and paste it into the immediate www folder of your cordova project. And then run
cordova run android
Deploy the .apk file in your emulator or real device to test the app.
Let me know if it helps.
Finally I solve my problem. I found that through this link it autogenerates the files.
Before I discovered that you need to create via sencha cmd the production files through the command in the app folder:
sencha app build production
With this two steps I created the .apk file,donwloaded and tested it.
Thanks to the previous comments.
There is so much conflicting information out there on this, I'm hoping we can shed some light.
Goal: Create and develop a phonegap app that will be built using phonegap build.
1) I don't want to install the android and iOS SDKs, that's why I want to use phonegap build.
2) I created an app using the cordova cli cordova create hello
3) There is no phonegap.js or cordova.js I guess because I didn't add a platform. But I don't want to add a platform as that requires installing the SDKs
4) I need to be able to debug and test this, so I downloaded ripple, which may or may not work, I need the phonegap.js file first to see.
So has anyone figured this out? Building and developing and app that will be used on Phonegap build?
Thanks!
Phonegap will let you create a UI using webview of Android, iOS, Blackberry or other platforms. That means you need to have native SDK to apply Phonegap Build. It doesn't mean that Phonegap will create an App for you and deploy it to other platforms.