-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(camera): resultForVideo uri in iOS13 #533
fix(camera): resultForVideo uri in iOS13 #533
Conversation
Can you edit the PR to include one of the keywords that signals that this issue closes #506 Github is bit picky, you must be explicit "fixes #issueTag" for example. https://help.github.com/en/github/managing-your-work-on-github/closing-issues-using-keywords |
Done 👍 |
Please, How to use this PR in my package. json like : git+https://github.com/apache/cordova-plugin-inappbrowser.git#27fe8ec8d4db84b34700d32c1f1351c9189cb951 ? |
Hey @breautek am I missing anything else? |
@guillem-sopra I'm not very experienced in the ios codebase, nor do I have apple hardware to test so I'm unable to make a code review. |
How to use this PR in my package. json like : git+https://github.com/apache/cordova-plugin-inappbrowser.git#27fe8ec8d4db84b34700d32c1f1351c9189cb951 ? Because, i use ionic cordova to build one of my app to iOS |
😢 How do you usually proceed in cases like this? Is there anybody I can 'enforce' to code-review/test this PR? |
Cordova is entirely volunteer driven so I can't "force" anybody to review a PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Anybody to help, please ? i use ionic cordova to build one of my app to iOS, and the last release not working - no video can upload to my server. And this fix could solve my issue. Anybody to help, please ? Please ! |
Hi, any update on this? Ty for any feedback in advance 🙏 😞 |
Hey, when will you deliver a new release with this PR ? I, myself, wait for it, for my ionic app. |
|
When will this be merged and released? |
#506 @fvadouko you can add a cordova plugin from github repository with the following command
for example:
I just forked the repo from @guillem-sopra (thank you for the PR) then I added a fixed plugin from github repository EditYou need to merge this branch changes to your forked repository master, as I do here
|
Does this work for you, guys? Because I still have a path with trim fragments and after closing, the app video file is not available |
Hi @wingo7 , if you read the whole original issue, you'll see that in addition of the plugin source code solution, you'll need also to patch the fileUri after the plugin call: // Using plugin fork with this PR solution!
let fileUri = await this.camera.getPicture(options);
// XXX: fix path for file:// protocol in iOS 13
const indexOfFilePrefix = parseInt(fileUri.indexOf('file://'), 10);
if (indexOfFilePrefix === -1) {
fileUri = `file://${fileUri}`;
} I hope this help you 👍 Edit: Here it is the original comment: #506 (comment) |
@rricamar the problem was in the other, I've changed code in the wrong place, after changing code by path: 'projectName/platforms/ios/projectName/Plugins/cordova-plugin-camera/CDVCamera.m' it works for me, thanks for replying me. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not recommended to use NSHomeDirectory
, the proper way of getting documents directory is by using NSDocumentDirectory
(it's not a direct replacement, check this to know how to use it )
Also, instead of creating a tmp folder inside Documents folder and copy the file there, you should write the file in NSCachesDirectory
As long as I know @guillem-sopra is not working anymore on his previous company, so don't expect any changes on this PR |
Look @jcesarmobile man, this is sad. I created this PR 5 months ago, coming form an issue that went unattended for long (with lots of comments of users asking to be fixed and released). I dedicated also hours form my spare time to get the code, test it and create the PR (crediting the original poster). I am not an Objective-C nor Cordova plugin developer, I just wanted to help. Now, 5 moths later, you request changes, which seem to be really simple to implement to an experienced Objective-C developer. As I said, I am not that, nor I have the project's code or the needed devices to test. I know OSS is frustrating, it relies on developers' good will and people sometimes can be rough with their demands. But I think this is not the case: this issue was absolutely abandoned. IMHO, not attending the issue with the level of activity it had for 5 months can't be considered maintaining a project. If anyone does not have the proper time to do it, its totally understandable, but it should remove himself from the project. If nobody can, then the project must be marked as unmaintained or deprecated. I'll try to do my best to implement the changes requested, but man, publicly complaining on twitter, where people does not have the context of the situation, omitting that the issue was ignored for months, all due to a thumbs down reaction ... not fair. |
ba2b84e
to
da71dbb
Compare
da71dbb
to
7e28e1d
Compare
OK, I've just tried last commit of the PR and it works, for test it: cordova plugin rm cordova-plugin-camera
cordova plugin add git+https://github.com/guillem-sopra/cordova-plugin-camera\#7e28e1d3456d7f12591983d7c5a70fe9cab2a40c Tested on an iPad Mini (iOS 13.3.1) Pls @jcesarmobile check it out again since maybe your request changes won't allow merge, ty 👍 |
Hey @jcesarmobile I saw bfa38fe, does it mean this PR is no longer needed? Hope it gets released soon, ty 👍 |
any update on this PR? |
This issue knocked me out for hours. When will it be merged? |
this problem is not present on 5.0.0 |
@jcesarmobile Thanks, but it doesn't work as expected for ios 14.1, WKWebView mode only, for cordova-ios 4.5.0, or cordova-ios 5.1.1. The problem is that I can't see the image or video after restarting the app. |
Just tested this with 5.0.0, and this problem seems still very much present. In 5.0.0 we still see an invalid non proprietary FILE_URI with no access to work with, like: |
In iOS 13, videos' uris are not being retrieved properly as this issue describes: #506 (comment)
Closes #506
Platforms affected
iOS
Motivation and Context
This PR aims to solve that bug ir order for the plugin to retrieve the file's uri properly. Full credit for this solution to #506 (comment).
Description
Please see #506 (comment)
Testing
Checklist
(platform)
if this change only applies to one platform (e.g.(android)
)