Comments (16)
By the way, when I change back the changed line fileURL = [NSURL URLWithString:path]; to fileURL = [NSURL fileURLWithPath:path]; all seems to work again for iOS8.
from cordova-plugin-file-opener2.
I am sorry, but on iOS9 it doesnot work for me as well.
The only thing I did, to get it work on iOS9 was building the App with the old plugin version again.
from cordova-plugin-file-opener2.
Hi @pwinkelm
Unfortunately I don't have an iDevice to test and the iOS 9 version was generously contributed by other users. Did you test the new plugin on a fresh, empty project? It might be a good idea to delete the old plugin completely and add the new version.
from cordova-plugin-file-opener2.
Hello @pwlin, I donot know all ins and outs but I was able to test on several devices and there is nothing wrong with the 'old' version, but you need to rebuild your App using the correct XCode version before running on iOS9.
The [UIDocumentInteractionController interactionControllerWithURL:fileURL] just needs this fileURLWithPath ([NSURL fileURLWithPath:path]) otherwise it will abort. As stated in comment 2: changing fileURL = [NSURL URLWithString:path]; to fileURL = [NSURL fileURLWithPath:path]; also solved the problem (and that was the only change made).
from cordova-plugin-file-opener2.
Hey @pwinkelm
I met the same problem and I solved it by changing the file path from a cdvfile://
to a file://
, by using fileEntry.toURL()
. I don't know whether this is also cause of your problem. π
from cordova-plugin-file-opener2.
Hey @pwinkelm . I too am getting the same problem, as i pass in a file path to fileOpener which has worked in all versions up to now. If i change the code to what you have suggested it works. My question, if the above change works for iOS on all versions, can it not be changed to use that instead?
from cordova-plugin-file-opener2.
@Gillardo, probably you are right but for now I stick to the old version because I have no time left to test furthermore (due to 'project'agreements :-)) and I don't wanna change the new version when I don't test it fully.
One additional remark ( @chineseneo ) : in 'my' code I get the file path from fileEntry.toURL and then even remove the "file://" from the path I got. Otherwise the "Copy to iBooks" (or "Copy to Adobe") did not work in iOS9. iOS8 handles this correctly as well but the link shows there "Open in iBooks".
from cordova-plugin-file-opener2.
@pwinkelm did you checkout the log on xcode about the problem?
from cordova-plugin-file-opener2.
@chineseneo, no I did not. As stated, for now no time for further investigation(s).
from cordova-plugin-file-opener2.
First off - awesome plugin!
Can I just clarify what you mean by the fileEntry.toURL comment please as I am also experiencing iOS9 issues? I have the latest version (2.0.2) and there is no mention of it in the README. Also can I just point out that the README still says 2.0.1 even though the package.json says 2.0.2.
Thanks.
from cordova-plugin-file-opener2.
fileEntry.toURL
is the reference to your file when using HTML5 FileSystem API (the preferred way to manipulate files in Cordova)
Sorry for the version discrepancies. I'll bump the version in the README.
from cordova-plugin-file-opener2.
Hi,
I'm having the same issue. I have the 2.0.2 version and it works on android but keep showing sharing options on IOS 9. I'm saving files with cordova.file.documentsDirectory path and file unique file name. Is there a formal solution to this?
from cordova-plugin-file-opener2.
Hi david, I am really sorry but currently I haven't got any iDevices to test iOS issues.
from cordova-plugin-file-opener2.
@pwlin You should probably put a note in the readme that this plugin has not been tested with iOs8/9/10. This is a pretty big issue. I understand that you cannot test everywhere, but you should at least make it clear to the users.
from cordova-plugin-file-opener2.
@Narretz Is there anything in particular that is not working for you?
from cordova-plugin-file-opener2.
@pwlin I have the same issue on the IOS10. And I think that the #103 issue is about the same problem
from cordova-plugin-file-opener2.
Related Issues (20)
- FileOpener2 error in electron 11 HOT 1
- Plugin is not handling Cookies in React project HOT 1
- Add documentation for error codes
- USB PORT PARAM HOT 1
- doesnt work with IOS and assets-library
- Usage in Capacitor HOT 1
- pdf opened in an external app cannot save changes HOT 1
- Cannot open file while is at app data location '/data/data/<app_id>/cache' HOT 2
- unable to open application/pdf format in Android device (Samsung Galaxy S21 and Samsung Galaxy S21+) HOT 2
- android.support.v4.content.FileProvider not found HOT 7
- Relative URIs are not supported.
- remove: android.permission.REQUEST_INSTALL_PACKAGES from plugins.xml HOT 85
- Text Open file in always localized in english (Android) HOT 4
- There was a problem parsing the package for android install apk HOT 1
- Can't edit file HOT 2
- Getting error after updating plugin to 4.0.0 on Android Studio HOT 2
- Unable to open some MP4 files on iOSοΌ HOT 1
- This plugin has a maintained forked repo now - please use and follow HOT 4
- Error: Current working directory is not a Cordova-based project.
- iPadOS not supported
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cordova-plugin-file-opener2.