Code Monkey home page Code Monkey logo

Comments (16)

pwinkelm avatar pwinkelm commented on July 20, 2024

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.

pwinkelm avatar pwinkelm commented on July 20, 2024

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.

pwlin avatar pwlin commented on July 20, 2024

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.

pwinkelm avatar pwinkelm commented on July 20, 2024

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.

chineseneo avatar chineseneo commented on July 20, 2024

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.

Gillardo avatar Gillardo commented on July 20, 2024

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.

pwinkelm avatar pwinkelm commented on July 20, 2024

@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.

chineseneo avatar chineseneo commented on July 20, 2024

@pwinkelm did you checkout the log on xcode about the problem?

from cordova-plugin-file-opener2.

pwinkelm avatar pwinkelm commented on July 20, 2024

@chineseneo, no I did not. As stated, for now no time for further investigation(s).

from cordova-plugin-file-opener2.

MrChris123 avatar MrChris123 commented on July 20, 2024

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.

pwlin avatar pwlin commented on July 20, 2024

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.

davidzas avatar davidzas commented on July 20, 2024

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.

pwlin avatar pwlin commented on July 20, 2024

Hi david, I am really sorry but currently I haven't got any iDevices to test iOS issues.

from cordova-plugin-file-opener2.

Narretz avatar Narretz commented on July 20, 2024

@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.

pwlin avatar pwlin commented on July 20, 2024

@Narretz Is there anything in particular that is not working for you?

from cordova-plugin-file-opener2.

vzharkov avatar vzharkov commented on July 20, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.