You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2020/01/09 05:09:46 UTC
[GitHub] [cordova-plugin-media-capture] mandatoryprogrammer opened a new
issue #160: [iPhone 11 Pro Max][iOS 13.3] App Crashes Immediately When
Calling navigator.device.capture.captureVideo
mandatoryprogrammer opened a new issue #160: [iPhone 11 Pro Max][iOS 13.3] App Crashes Immediately When Calling navigator.device.capture.captureVideo
URL: https://github.com/apache/cordova-plugin-media-capture/issues/160
# Bug Report
## Problem
On iOS 13.3 (iPhone 11 Pro Max) the app immediately crashes upon calling `navigator.device.capture.captureVideo`.
### What is expected to happen?
The video capturing should start.
### What does actually happen?
App crashes.
## Information
### Command or Code
Here is my full code for Cordova:
```javascript
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
var app = {
// Application Constructor
initialize: function() {
document.addEventListener('deviceready', this.onDeviceReady.bind(this), false);
},
// deviceready Event Handler
//
// Bind any cordova events here. Common events are:
// 'pause', 'resume', etc.
onDeviceReady: function() {
this.receivedEvent('deviceready');
start();
},
// Update DOM on a Received Event
receivedEvent: function(id) {
var parentElement = document.getElementById(id);
var listeningElement = parentElement.querySelector('.listening');
var receivedElement = parentElement.querySelector('.received');
listeningElement.setAttribute('style', 'display:none;');
receivedElement.setAttribute('style', 'display:block;');
console.log('Received Event: ' + id);
}
};
app.initialize();
async function start() {
/*
cordova.plugins.notification.local.schedule({
title: 'ayy lmao',
text: 'ayy lmao',
foreground: true
});
*/
// capture callback
var captureSuccess = function(mediaFiles) {
/*
var i, path, len;
for (i = 0, len = mediaFiles.length; i < len; i += 1) {
path = mediaFiles[i].fullPath;
// do something interesting with the file
}
*/
};
// capture error callback
var captureError = function(error) {
//navigator.notification.alert('Error code: ' + error.code, null, 'Capture Error');
};
// start video capture
navigator.device.capture.captureVideo(captureSuccess, captureError, {limit:1});
}
```
### Environment, Platform, Device
Mojave 10.14.6 (18G103)
iOS 13.3 (iPhone 11 Pro Max)
### Version information
iOS 13.3 (iPhone 11 Pro Max)
Cordova CLI
Xcode
## Checklist
<!-- Please check the boxes by putting an x in the [ ] like so: [x] -->
- [x] I searched for existing GitHub issues
- [x] I updated all Cordova tooling to most recent version
- [x] I included all the necessary information above
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[GitHub] [cordova-plugin-media-capture] mandatoryprogrammer commented on
issue #160: [iPhone 11 Pro Max][iOS 13.3] App Crashes Immediately When
Calling navigator.device.capture.captureVideo
Posted by GitBox <gi...@apache.org>.
mandatoryprogrammer commented on issue #160: [iPhone 11 Pro Max][iOS 13.3] App Crashes Immediately When Calling navigator.device.capture.captureVideo
URL: https://github.com/apache/cordova-plugin-media-capture/issues/160#issuecomment-572729673
Upon viewing the output I got the answer to my own problem :)
```
HelloToptal[16367:1354451] [access] This app has crashed because it attempted to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSMicrophoneUsageDescription key with a string value explaining to the user how the app uses this data.
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[GitHub] [cordova-plugin-media-capture] mandatoryprogrammer edited a comment
on issue #160: [iPhone 11 Pro Max][iOS 13.3] App Crashes Immediately When
Calling navigator.device.capture.captureVideo
Posted by GitBox <gi...@apache.org>.
mandatoryprogrammer edited a comment on issue #160: [iPhone 11 Pro Max][iOS 13.3] App Crashes Immediately When Calling navigator.device.capture.captureVideo
URL: https://github.com/apache/cordova-plugin-media-capture/issues/160#issuecomment-572729673
Upon viewing the output I got the answer to my own problem :)
```
HelloToptal[16367:1354451] [access] This app has crashed because it attempted to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSMicrophoneUsageDescription key with a string value explaining to the user how the app uses this data.
```
Had to add the following to my `config.xml`:
```xml
<config-file overwrite="true" parent="NSMicrophoneUsageDescription" platform="ios" target="*-Info.plist">
<string>Microphone access needed</string>
</config-file>
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[GitHub] [cordova-plugin-media-capture] mandatoryprogrammer commented on
issue #160: [iPhone 11 Pro Max][iOS 13.3] App Crashes Immediately When
Calling navigator.device.capture.captureVideo
Posted by GitBox <gi...@apache.org>.
mandatoryprogrammer commented on issue #160: [iPhone 11 Pro Max][iOS 13.3] App Crashes Immediately When Calling navigator.device.capture.captureVideo
URL: https://github.com/apache/cordova-plugin-media-capture/issues/160#issuecomment-572716596
Good to know, I'll do so and post the result.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[GitHub] [cordova-plugin-media-capture] breautek commented on issue #160:
[iPhone 11 Pro Max][iOS 13.3] App Crashes Immediately When Calling
navigator.device.capture.captureVideo
Posted by GitBox <gi...@apache.org>.
breautek commented on issue #160: [iPhone 11 Pro Max][iOS 13.3] App Crashes Immediately When Calling navigator.device.capture.captureVideo
URL: https://github.com/apache/cordova-plugin-media-capture/issues/160#issuecomment-572555863
I would advise you to open your project in XCode and launch your app from there. The XCode debugger will automatically be detached and the app should break point automatically on crash. You'll also have access to the native log which you should paste the contents here. Thanks.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[GitHub] [cordova-plugin-media-capture] mandatoryprogrammer closed issue
#160: [iPhone 11 Pro Max][iOS 13.3] App Crashes Immediately When Calling
navigator.device.capture.captureVideo
Posted by GitBox <gi...@apache.org>.
mandatoryprogrammer closed issue #160: [iPhone 11 Pro Max][iOS 13.3] App Crashes Immediately When Calling navigator.device.capture.captureVideo
URL: https://github.com/apache/cordova-plugin-media-capture/issues/160
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[GitHub] [cordova-plugin-media-capture] mandatoryprogrammer commented on
issue #160: [iPhone 11 Pro Max][iOS 13.3] App Crashes Immediately When
Calling navigator.device.capture.captureVideo
Posted by GitBox <gi...@apache.org>.
mandatoryprogrammer commented on issue #160: [iPhone 11 Pro Max][iOS 13.3] App Crashes Immediately When Calling navigator.device.capture.captureVideo
URL: https://github.com/apache/cordova-plugin-media-capture/issues/160#issuecomment-572390144
If it helps my `config.xml` is:
```xml
<?xml version='1.0' encoding='utf-8'?>
<widget id="toptal.hello" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>HelloToptal</name>
<description>
A sample Apache Cordova application that responds to the deviceready event.
</description>
<author email="dev@cordova.apache.org" href="http://cordova.io">
Apache Cordova Team
</author>
<content src="index.html" />
<plugin name="cordova-plugin-whitelist" spec="1" />
<access origin="*" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<allow-intent href="tel:*" />
<allow-intent href="sms:*" />
<allow-intent href="mailto:*" />
<allow-intent href="geo:*" />
<platform name="android">
<allow-intent href="market:*" />
</platform>
<platform name="ios">
<allow-intent href="itms:*" />
<allow-intent href="itms-apps:*" />
</platform>
<config-file overwrite="true" parent="NSCameraUsageDescription" platform="ios" target="*-Info.plist">
<string>fuck you</string>
</config-file>
<config-file overwrite="true" parent="NSPhotoLibraryUsageDescription" platform="ios" target="*-Info.plist">
<string>fuck you</string>
</config-file>
<config-file overwrite="true" parent="NSPhotoLibraryAddUsageDescription" platform="ios" target="*-Info.plist">
<string>fuck you</string>
</config-file>
<config-file overwrite="true" parent="NSLocationWhenInUseUsageDescription" platform="ios" target="*-Info.plist">
<string>fuck you</string>
</config-file>
</widget>
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org