I use the latest NativeScript Sidekick and Preview for developing (vanilla, pure JS) apps, recently I installed Couchbase Lite Plugin https://market.nativescript.org/plugins/nativescript-couchbase
When I write var couchbaseModule = require("nativescript-couchbase"); in
the JS file of a page and if I try to open the page, this error message shows up
But if I remove var couchbaseModule = require("nativescript-couchbase"); the page loads without error.
Why this happens? How can I use and require couchbase plugin? What can I do to solve this problem?
Limitations
The Preview app comes with a predefined set of NativeScript plugins. If your app utilizes a plugin that is not present in the Preview app, you will see a warning message and your app might not work as expected.
nativescript-couchbase plugin is dependent on their native libraries, so you must have complete environment setup to build your project locally in order to test it. Preview won't support this plugin.
Related
I'm really new to developing an Android app using NativeScript Vue.
I'm struggling to understand what the debugging capabilities are. I have created a sample project using the template https://github.com/nativescript-vue/vue-cli-template) and have read about vue devtools. I'm wanting to put breakpoints in my JavaScript somewhere (in Chrome?) so I can step through my code, I just can't work out if this is possible?
Can anyone help?
Thanks
Did you try tns debug [ios|android]?
This will by default initiate a debugger with Chrome Dev Tools. You will see a URL in console once app is launched in your Simulator / Device, just have hit that with Chrome.
I'm trying to get links in a Phonegap app to open the system browser but recently they stopped working when using Phonegap build. They work if I build the app locally and put it on my phone, but now when the app is built using Phonegap build. I'm including it in my config file like this:
I also have the following code in my deviceready listener:
$$(document).on('deviceready', function() {
console.log("Device is ready!");
window.open = cordova.InAppBrowser.open;
});
And finally, here's an example of what my links look like:
Dashboard
I've whitelisted the urls that I would like to open. The strange thing is that if I leave my app, the browser opens and goes to the url. It appears that I must exit the app to get the link to trigger. Has anyone run into this problem?
Suppose we write a Xamarin MVC application which is deployed to a device and runs connected to the web.
If we need to update the application by downloading some images, CSS, or .js files using WCF service, for example, is that possible?
Does iOS, Android, and Windows allow you to do that?
Thanks
You can not update the app bundle itself on either iOS or Android, and presumably UWP but I am not very familiar with that platform so not sure. For iOS and Android the app bundles are signed so they can not be modified or else the signature will no longer be valid. You can, however, download anything you want and store the downloaded files in the file system. Every app does have a file system it can access to read and write from. See this Xamarin doc:
Forms:
https://developer.xamarin.com/guides/xamarin-forms/working-with/files/
You might also want to look into the PCLStorage plugin:
Xamarin Component: https://components.xamarin.com/view/pclstorage
NuGet: https://www.nuget.org/packages/PCLStorage/
Source: https://github.com/dsplaisted/PCLStorage
(I know I should paste relevant bits from links, but there is just too much to paste and would end up pasting the whole article. If above link is broken, just google "Xamarin working with files")
Note: I work for MS/Xamarin
I am using Visual Studio 2015 tools for Apache Cordova for mobile application development on Windows 7.
To build and run my app, I have to choose one solution platform and one target.
Is there any way to view the output on my browser just like a web app with no emulator?
When I press f5, the result will open in a browser in an emulator mode which I choose as system platform and target device. But I want to run my app like a web application, when you right click on index.html and select view in browser.
I look for a project setting or a ‘system platform’ and ‘target device’ value that work like that.
PS:Selecting any windows solution platform and local machine target needs Windows 8 or higher and the build process is failed.
Thank you.
The solution I found for my problem:
I used the url of my output result with emulator: "http://localhost:4400/index.html?enableripple=cordova-3.0.0-NexusS"
and then removed the emulator settings in url: "http://localhost:4400/index.html".
Using this url will cause some popups asking some things. These are for 'cordova.js' script which is referenced in index.html file of cordova project. As we do not need this in browser, commenting the line <script src="cordova.js"></script> from index.html, no dialog will open any more and the project will compile so faster for initial design that do not need cordova.
Now I will use chrome mobile mode (f12-> phone icon) to see mobile view of my app.
#A.M.
The answer depend on your expectations.
If you just want to view the page layout and test some of the associated Javascript, the answer is YES.
If you want to test the plugin libraries and associated JS, the answers is NO.
However, here are some items to be cautious with - either way.
When running your code on a device, you MUST wait for the
'deviceready'. There are not ifs, ands, ors, or buts on this - you
must wait.
You can emulate some of the plugins. This Summer some of HTML5 APIs have become available. If you want to write a shim, you can emulate some plugins with the HTML5 APIs, and use the Phonegap plugins on the mobile device. NOTE: some emulators now support HTML5 APIs.
Not all browsers are equal and not all webview libraries are equal. Cordova and Phonegap both use a webview library with their respective platforms. On Android, it is called Webview. On iOS, it is WKWebview. These libraries are finally starting to get some attention. So Google, Apple, Intel and others are all making competing libraries. *better for us* ;) One new library for Android is called crosswalk. Many developers like it, but it is bloated.
Best of Luck
Im experiencing some lag when I create a Web Application Starter Project when it renders the text box. Anyone know why and how to fix this? Its just the standard test code that comes with eclipse and is provided as a checkbox.
The video is here: http://videobin.org/+5hk/5x8.html
It is lagging because you are using development mode. Compile your app, than remove gwt.codsrv parameter from address.