cordova-plugins

Cordova error: Using “requireCordovaModule” to load non-cordova module “q” is not supported

久未见 提交于 2019-11-27 21:48:51
I noticed that the builds on our CI started to fail because of the following error: Discovered plugin "cordova-plugin-app-version" in config.xml. Adding it to the project Installing "cordova-plugin-app-version" for android Adding cordova-plugin-app-version to package.json Using "requireCordovaModule" to load non-cordova module "q" is not supported. Instead, add this module to your dependencies and use regular "require" to load it. [ERROR] Exception: The command '/bin/sh -c ionic cordova platforms add android' returned a non-zero code: 1 Same issue happens on both iOS and Android. After some

Running Ionic 3 app on iPhone throws error: 2 duplicate symbols for architecture arm64

孤街醉人 提交于 2019-11-27 21:35:29
问题 I am opening .xcworkspace of my Ionic 3 project and trying to run it on my device but I suddenly get the following error in Xcode: Ld /Users/manuel/Library/Developer/Xcode/DerivedData/MyApp-awaxbzztsgokklgptpuoufwcwmkt/Build/Products/Debug-iphoneos/MyApp.app/MyApp normal arm64 cd /Users/manuel/Documents/MyApp/dev/copernic4-ion2/galilei/platforms/ios export IPHONEOS_DEPLOYMENT_TARGET=9.0 export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:

Cordova list all files from application directory (WWW)

梦想的初衷 提交于 2019-11-27 20:34:15
I am using Cordova 4.2.0 with plugins File and media. I have some mp3 files in audio folder inside www directory. I am able to play files through media plugin using path cordova.file.applicationDirectory+"www/audio/01.mp3" and trying to get all available files list using window.resolveLocalFileSystemURL but unable to do so. Please see below code always goes to fail function. window.resolveLocalFileSystemURL(cordova.file.applicationDirectory+'/www/audio', function(dirEntry){ alert('in'); }, fail ); Please guide me the best way. You can use this function to get all available files in www/audio/

How to provide and handle deep links in cordova / phonegap applications

我怕爱的太早我们不能终老 提交于 2019-11-27 20:16:54
Hi I would like to know of a Cordova / Phonegap plugin or way to expose and handle deep-links in my Sencha Touch / Cordova App So far I am able to deep-link into other applications lets say open Google Play to a specific app detail page. Using this plugin https://github.com/code4jhon/org.apache.cordova.startapp So what I would like to do is enable other applications to open specific views or functionalities in my application. I would like to support Android and IOS. So bottom line is there a Cordova plugin to expose Activities for Android and their counterparts on IOS ? Or how to achieve this?

Android SDK not found. Make sure that it is installed. If it is not at the default location, set the ANDROID_HOME environment variable

痴心易碎 提交于 2019-11-27 18:20:07
问题 "Android SDK not found. Make sure that it is installed. If it is not at the default location, set the ANDROID_HOME environment variable." Facing this issue while building the Cordova Project through Terminal, if I run through Android Studio I am not getting the issue what will be the root cause for this issue. 回答1: This is just a workaround while cordova is being updated: Remove directory /Android/sdk/tools download https://dl.google.com/android/repository/tools_r25.2.3-linux.zip Unzip Place

Ionic 3 - ios - displaying selected image on screen

断了今生、忘了曾经 提交于 2019-11-27 15:44:12
I set up the camera plugin to select an image from the photo library and upload it to the server with the following code: getImage() { //By default the camera retrieves the image as a JPEG file. const options: CameraOptions = { quality: 100, destinationType: this.camera.DestinationType.FILE_URI, sourceType: this.camera.PictureSourceType.PHOTOLIBRARY, targetWidth:1080, targetHeight:1080, correctOrientation: true, mediaType: this.camera.MediaType.PICTURE, encodingType: this.camera.EncodingType.JPEG } this.camera.getPicture(options).then((fileUri) => { if (this.platform.is('ios')) { return this

Ionic 2 File Plugin usage examples

大憨熊 提交于 2019-11-27 13:36:05
Does anyone have complete examples about how to use the Cordova Native File Plugin in a Ionic 2/Angular 2 project? I installed this plugin but the documentation don't seems to make much sense to me due the fact it is fragmented and lacks of a complete example, including all needed imports. For example, the following example don't shows where objects like LocalFileSystem or window came from. window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, function (fs) { console.log('file system open: ' + fs.name); fs.root.getFile("newPersistentFile.txt", { create: true, exclusive: false }, function

ionic 2 error cordova not available

爷,独闯天下 提交于 2019-11-27 13:29:10
I am trying to use the cordova GooglePlus plugin in a new ionic 2 project (latest ionic2 version) but I always run into errors regarding cordova. The plugin is properly installed and shows up in the plugin folder. One approach I tried is this: import { GooglePlus } from "ionic-native"; and then GooglePlus.login().then(...) The login method executes but always throws an error saying "cordova_not_available" I want to test the app with ionic serve on my windows system first before deploying it to my android phone. How can I make cordova available in the localhost server? From searching I

Custom Cordova Plugin: Add framework to “Embedded Binaries”

风格不统一 提交于 2019-11-27 12:29:24
In a custom Cordova plugin, how can I config a specific .framework file in plugin.xml such that it will be added to the "Embedded Binaries" section in Xcode? If that's not currently possible directly in plugin.xml, I'm open to alternative suggestions. Alon Amir I've implemented a workaround until it's supported by Cordova's plugin.xml , hopefully, in the future, once an embed property in such entries will have the same effect: <framework embed="true" src="..." /> , for now, this property does not help, hence the following workaround. The following solution worked using Cordova version 5.3.3.

Showing camera view inside html in android and then snap a picture

时光总嘲笑我的痴心妄想 提交于 2019-11-27 11:36:59
Is there a view of showing the live camera view inside html ( e.g. embedded in a div ) before we snap a picture using JavaScript? I have tried PhoneGap but it totally starts a new camera app and totally moves away from my html web app before returning to it. I need something embedded in my app Thanks You can install mbppower/CordovaCameraPreview plugin (for android,ios) in your Cordova/phonegap application that allows camera interaction from HTML code. A really amazing plugin it is.. You can access Features such as: Start a camera preview from HTML code. Drag the preview box. Set camera color