I installed Cordova Plugin for OpenTok iOS in Ionic app
Using this
cordova plugin add https://github.com/songz/cordova-plugin-opentok/
When i refer it using this
< script type="text/javascript" charset="utf-8"
src="opentok.js">
in Index.html File
I get not found (404)
This is normal behavior, because cordoba serves the plugin on the mobile device. When you debug on your web, cordoba is inactive, so you need to provide these dependencies yourself.
Related
I have created a new Ionic (Capacitor) app and I want to use the native facebook plugin, The plugin documentation says that is supported in the Android, iOS and Browser platforms, but when I run the app in the browser I get a Native: tried calling Facebook.login, but Cordova is not available. Make sure to include cordova.js or run in a device/simulator error.
How can I run the facebook plugin from the browser?
I am doing ionic application with capacitor.
I have to use https://ionicframework.com/docs/native/themeable-browser plugin for one funcationality but when I make build and upload to apple store app is rejected because of UiWebView issue.
Commands for installing themeable plugin
npm install cordova-plugin-themeablebrowser
npm install #ionic-native/themeable-browser
ionic cap sync
If I remove that plugin and upload it to apple build process pass successfully.
Apple no longer accepts new submissions using UIWebView:
https://forums.developer.apple.com/thread/122114
There is also an Ionic blog article: https://ionicframework.com/blog/understanding-itms-90809-uiwebview-api-deprecation/
You can use Capacitor's Browser API, but it is quite limited compared to some existing Cordova plugins. However it is built around WKWebView and is therefore compliant.
There is AFAIK no alternative but to move to WKWebView if you want your app to be on the Apple App Store.
I assume you are using Themeable Browser instead of InAppBrowser because you need to customize the toolbar and other components. Unfortunately Themeable Browser is no longer a supported project. In InAppBrowser version 5.0.0 https://cordova.apache.org/announcements/2021/02/16/inappbrowser-release-5.0.0.html only uses WKWebView and you can now set InAppBrowserStatusBarStyle to "darkcontent". Unfortunately, other changes have to be applied manually. I succeeded for Android and I fight for Ios :-)
I have a cordova plugin which supports Android, iOS and browser platforms. But when adding the plugin in an ionic app that is being developed/built using ionic serve or ionic devApp, the error comes as 'plugin is not defined'. Is there a way to add the ionic devApp support to a cordova plugin ? If it means only using the browser code for all the platforms(Not using any native platform code), then it works for me. Thanks in advance.
I have added the browser platform to my plugin but it does not work with ionic serve even when the app is running on browser. Note that the plugin works fine on browser when the app is run using ionic cordova run browser command.
I want the cordova plugin to be compatible with all platforms - Android, iOS , browser and devApp. My expectation are that when the app is run using ionic cordova run android/ios/browser command, it should use the native code of my cordova plugin. And when the app is run using ionic serve or ionic devApp, then it should use the web code.
In order to incorporate the Toastr ngCordova plugin.. I followed the following steps
bower install ngCordova
include ngCordova in my app
angular.module('app', ['ionic', 'ngCordova'])
Install plugin
cordova plugin add https://github.com/EddyVerbruggen/Toast-PhoneGap-Plugin.git
Use the plugin
app.controller('myController', function($cordovaToast) {
});
This seems pretty straight forward. However I encounter the following errors:
ionic.bundle.js:21157 TypeError: Cannot read property 'toast' of undefined
at Object.show (http://localhost:8100/lib/ngCordova/dist/ng-cordova.min.js:9:20474)
I am running the app in chrome browser.
What am I missing here ?
ngCordova plugins won't work in the browser.
From documentation:
Only develop on your phone
Cordova plugins do not work while developing in your browser, because each plugin accesses a specific API (such as camera, microphone, accelerometer) which is not available in your browser. Additionally, some plugins don't work in the emulator, such as the Camera plugin, so development on your physical device is required.
In this case be sure that your application works on your device.
I updated a phonegap 2.5 app to ios7 and cordova 3.1. It runs only on iOS.
When the external links wouldn't open, I included the InAppBrowser plugin and that worked.
But how to I get the mail links (E-Mail me) to open in the native mail program? There is no such plugin.
I tried the contacts plugin. But it wasn't that.
I saw the EMail Composer plugin, but I am looking for support by cordova or a cordova plugin.
I used this simple html style of doing it. Works fine on ios7 and cordova 3.5 and android 4.4
<a href="mailto:abc#gmail.com" data-rel='external'>
I'm not even using any plugins such as inappbrowser, just in case you have that doubt.
Just solved it.
Seems to be a missing feature of the iOS simulator. On my iPhone 4 it works.