I am working on an cordova Barcode Scanner app for mobile Devices. I am using the Framework QuaggaJS for Barcodescanning and the cordova-plugin-ioswebrtc to implement the webrtc functions to cordova. Its working fine on Android Devices and on local Web Browsers on PC, but if i want to use it on iOS I always getting the error "Failed to load ressource: file is directory".
I am initializing Quagga with the following settings:
{decoder:{readers:["code_93_reader"]},
numberOfWorkers: 4,
inputStream:
{
name: "Live",
type: "Livestream",
target: document.querySelector('#scanner'),
constraints:
{
width:{min:640},
height:{min:480},
facingMode: "environment"
}
}
}
The error Message does not describe where the error comes from so I am not sure if its a problem of quaggaJS or of the iOS WebRTC plugin of cordova. Does anyone has build a cordova app with QuaggaJS and can help me where these problem comes from?
If I am Running the getUserMedia Function in the console, i get to different Objects back. In normal iOS Browser the result is of type MediaStream and in the cordova app the result is of type Blob. In safari my app is working without problems, and the Blob Object has all attributes of MediaStream and more so that should not be a problem or?
Related
I am building a cordova app for android and iOS that stores user information in a local database. However, I am unable to open a database connection on iOS.
The app works perfectly on android, but when I run it on iOS I get an error saying that window.sqlite is undefined. I have been searching the internet, but I can't find a related issue. I am not sure if my code has been setup incorrectly, or if I am missing some configuration for iOS. The SQLite plugin I am using "cordova-sqlite-evplus-legacy-free 0.9.1", and the cordova iOS version is "5.0.1".
db = window.sqlitePlugin.openDatabase({
name: 'test.db',
location: 'default',
//iosDatabaseLocation: 'Library'
},
function(db) {
if (clean_database) dumpDatabase();
else buildSchemaVersions();
},
function(error) {
db_error = error;
alert('Open database ERROR: ' + error.message);
})
First of all: I would strongly advise against using a plugin for which the last update has been made more than 2 years ago, especially if it is for something as important as the database of your app. It is very likely that it has not been properly tested on current version of iOS. Why not use the more active plugin cordova-sqlite-storage? I have been using this plugin for years now without any issues whatsoever (iOS and Android).
For the question itself:
Did you make sure to make the openDatabase call after the deviceready event?
Was the plugin correctly added to the iOS platform? Please try removing it and adding it again and look out for any errors when it is added to the iOS platform.
I developed my application in ionic 3 and my back-end is PHP PDO , my app is working perfectly in Android and all the web services are getting called perfectly.
I have imported my code in Mac Book and generated in Xcode. when I run that code in simulator API are not getting called and shows error as HTTP failure Response from unknown URL 0 Unknown Error.
I have already added white list Plugin in iOS
I have already added CSP in my index.html file
API are getting called in Safari Browser perfectly but not in simulator and real device.
Any help is appreciated.
I have Degraded ionic web view for ios and that worked for me.
I am using opentok in my Hybrid ionic app for live streaming.
I am facing issue that I am unable to see live streaming in ios app, although its working on my android app which is already published on Google Play,
Now I need to publish my ios app but I am stuck with these errors showing in Xcode
"ERROR: OT.Publisher.onStreamAvailableError OT_MEDIA_ERR_ABORTED: Argument 1 ('mediaStream') to webkitAudioContext.createMediaStreamSource must be an instance of MediaStream"
"ERROR: OT.exception :: title: Unable to Publish (1500) msg: GetUserMedia"
Device I am using is iPhone 6 (OS 11.0, Safari 11.0)
I had same problem.
For me, problem was in publisher options for OT.initPublisher.
Option "resolution" was redundant. It crashed everythin for ios only, I commented it -ant everything is ok now. Good luck!
You can use the Cordova OpenTok Plugin to add live video to your Ionic applications:
https://github.com/opentok/cordova-plugin-opentok/
The plugin allows you to publish, subscribe, and use the OpenTok Signaling API on both iOS and Android. For Ionic samples, take a look at the following repo: https://github.com/opentok/opentok-ionic-samples
we have migrated a worklight 6.1 application t IBM mobilefirst 7.0 platform and all the functionalities working as expected on the android environment, but in ios we are facing an issue: there is a function called "quick receipt". on click on a button the device camera opens and a photo is taken. The problem is that the photo is not displaying - it returns complete blank page this issue on ios device only but not on Android device.
Camera.DestinationType.FILE_URI is not working on IOS.
for security reason we wont share the code. here is similar prototype code.
html
<div><img alt="QuickReceipts" src="resources/img/camera.png" onclick="imgCapture();"</div>
JavaScript
imgCapture: function (){
navigator.camera.getPicture(this.onSuccess, this.onFail,{quality:80,destinationType:Camera.DestinationType.FILE_URI, targetWidth:600,targetHeight:1050}
},
onSuccess:function(imgData)
{
// applying the css and displaying the img
$("#imgReceipt").attr("src","data:image/jpeg;base64," +imgData);
$("#imgReceipt").css("display", "block");
}
onFail:function(imgData){
// failure msg
}
One suggestion is to attempt to code change as mentioned by Nazmul: http://www.telerik.com/forums/ios-cordova-3-5-0-camera-getpicture-targetwidth-issue.
Another suggestion is to upgrade to the latest 7.1 iFix from IBM Fix Central which contains several Cordova corrections and may address your issue.
If your issue is not resolved still, I suggest to open an IBM PMR (support ticket).
i created an hybrid application that should connect to the MFP and consume data.
When i try to connect to the Desktop Browser Application everything is fine and the app works. Same behaviour when i try the Mobile Web Application. BUT when i try to connect with the mobile native iOS application i could not connect and receive the following error (in the console):
2015-11-12 17:22:15.031 APPXYZ[6072:3089110] [FATAL] [NONE] Uncaught Exception: TypeError: WLJSX.Ajax.WLRequest.setConnected is not a function. (In 'WLJSX.Ajax.WLRequest.setConnected(false)', 'WLJSX.Ajax.WLRequest.setConnected' is undefined) at (compiled_code):3871
My specs:
MFP version 7.1.0.00.20151107-1653
Xcode 7.1.1
iOS deploy target 8.0
Transport security protocol is deactivated (Allow Arbitrary Loads -> YES)
I cannot confirm this claim.
Using the following, I create a blank new Hybrid app with the iPhone environment, that calls the WL.Client.connect method in wlCommonInit() and displays an alert with "success" or "failure" accordingly. I got "success". No errors in the Xcode Console.
Xcode 7.1.1
IBM MobileFirst Platform Studio 7.1.0.00-20151107-1647
If you are doing something different in your project, do let us know...
The solution of my problem was that i change the init calling sequence of my app. I called the wl specific functions to early. After changing the sequence my app runs perfectly.....
thx 4 help :)