I've used the [yeoman chromeapp generator][1] to scaffold out a Google Chrome Packaged App. The instructions for that generator say running the command grunt debug should launch the packaged app in the Chrome App container, but it doesn't. Instead it opens the packaged app as a regular hosted web app in a tab. Though I am a Grunt noob I'm looking at Gruntfile.js trying to figure out why it doesn't launch the app as a packaged app in the app container, but can't see where the problem is. What's the proper way to get Grunt to launch a Chrome App?
Had the same issue with the Yeoman live-reload—not great for testing actual apps with background js, native permissions, etc.
To manually launch a Chrome app from a folder, I've been using this idiom: ~/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --load-and-launch-app=/path/to/chrome/app/"
There's also this project chrome-app-livereload (blog post) which supposedly swaps out livereload's standard reload with one suitable for inclusion in an app.
You have to go to chrome://extensions, check the box Developer Mode and then click Load Unpacked Extension and point it to your manifest file. This will load your app in a Chrome App Container.
Related
I am working in an established iOS app. I have backfilled the app to use React Native, and so far that part is working fine. The problems I am running into are:
The Xcode build takes a very long time, and any JavaScript errors will cause the initial build to fail
Once the build succeeds and the app is started (on a physical device), the initial launch says it is trying to connect to Metro, but it never actually does. Instead the RN view pops into place without downloading from the server. At this point I cannot refresh the JavaScript from the Metro bundler, it states that there is no app connected. Additionally, if I shake the device and try to select "Debug in Chrome" the screen will go blank and no longer respond.
If I do not try to open the developer menu and select "Debug in Chrome", but instead just force close the app, when I re-launch the app (not rebuild from Xcode) it will connect to Metro and download the JavaScript bundle like normal. At this point I can select "Debug in Chrome" and it will connect and work just fine.
All-in-all, this isn't a huge issue as there is a workaround available to me. However, it doesn't feel right and I would like to figure out what is going on.
My theory is that during the build process, Xcode is bundling the React Native code as if it is trying to do a production build (I have verified the scheme is set to debug) in a debug executable. I have tried detecting __DEV__ and it is true, so I cannot figure out how to get the app to connect to Metro directly after the Xcode build.
Thank you all in advance for any help you can offer.
I am now learning cordova and i wanna know something.
Example, I have index.html & index.js in my cordova project.
I will build app and install it in my phone.
So the question is those two files index.html & index.js will be in app package folder inside phone local storage?
Thanks
Yes, the files show up in a hidden area on Android and iOS. Anyone with a rooted phone can see them. Don't store security keys in your code.
All Cordova really is is on Android and iOS is a reference to the embedded browser available on both systems and hook to load whatever page you specify in the config.xml. You can even set the config.xml starting file to be your webpack dev server. Therefore your html and JS files have to exist somewhere for the web browser to open them.
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.
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 using Firefox App Manager to upload a packaged app to a Firefox OS phone, a KEON.
Now, when I go into the debugger and click on one of the source files, then I see:
[no source]
Is it even possible to step though source code using App Manager? If so, how?
With help by #JasonWeathersby I figured out that the problem is triggered by:
The app is privileged. Excerpt from manifest.webapp:
"type": "privileged"
The Keon is running Firefox OS 2.0.0.0-prerelease.
Source code shows up either if I remove "type": "privileged", or if I install 1.3 on the Keon.
On Bugzilla#Mozilla, I filed against Firefox App Manager: Bug 1020948 - No source in App Manager for privileged app on Keon with 2.0.0.0-prerelease