Code Monkey home page Code Monkey logo

Comments (19)

pwlin avatar pwlin commented on July 20, 2024

Have you checked the latest version (2.0.0) either from Github or NPM? People were graciously fixing iOS 9 bugs and sent me a couple of pull requests. I have merged them all which should have fixed all the iOS 9 issues. Please test the latest version and let me know if you still have a problem.

from cordova-plugin-file-opener2.

jmrezayi2 avatar jmrezayi2 commented on July 20, 2024

Hey!

Not really, I have been using 1.11 and thought that is the latest version. I will look into it.
Can you help me finding it on npm? I could not find it by searching in npmjs.com. Is the package name cordova-plugin-fileopener2? I could see it in your readme: cordova plugin add cordova-plugin-file-opener2

Thanks!

from cordova-plugin-file-opener2.

jmrezayi2 avatar jmrezayi2 commented on July 20, 2024

By the way, is it possible for you to submit it to phonegap plugins as well? can save a lot of confusion for people who are not that familiar with Cordova.

from cordova-plugin-file-opener2.

pwlin avatar pwlin commented on July 20, 2024

An older version of this plugin is already in Phonegap Build, but I can not update it because a couple of months back they changed their website and currently only paid customers can submit plugins. I marked the plugin as deprecated there and added the link to NPM repo, so hopefully users can be notified.

from cordova-plugin-file-opener2.

jmrezayi2 avatar jmrezayi2 commented on July 20, 2024

Hello!

Thank you for your information and marking it on deprecated.

I tried version 2.0.0 on iOS9 and it is working. However, there is this issue:

If one is trying to open a pdf file, in the open with dialog, choosing "Copy to iBooks" opens it fine.
However, if one chooses "Mail" as the opening app, it opens it in the mail app with attachment, but it gets frozen when trying to cancel and delete it or save as draft.

Do you think what could be the issue, or even prevent the iOS from showing "mail" as an option?

Thank you so much in advance!

from cordova-plugin-file-opener2.

pwlin avatar pwlin commented on July 20, 2024

Yes that is a known problem and was discussed in issue #17 last year. Some users said that another Cordova plugin called Cordova-Open solved their problem, so maybe you can try that one?

from cordova-plugin-file-opener2.

jmrezayi2 avatar jmrezayi2 commented on July 20, 2024

Hey You are a life saver! It seems to be working fine on iOS 9. I need to check on older iOS versions as well. Since I am using phonegap build, it is called "com.disusered.open" there.

By the way I have a javascript that given the file extension, spits out the meme that your plugin needs. Do you think it is a good idea to combine it with your plugin so that the application type becomes an optional argument?

from cordova-plugin-file-opener2.

pwlin avatar pwlin commented on July 20, 2024

Good to hear you solved your problem. I don't think making the MIME-type an optional argument is a good idea at the moment, it will over-complicate the code and will also limit the plugin to those MIME-types defined in the script. And let's be honest, if someone does not know the MIME-type of the file they are trying to open, they have a much larger problem don't they? :) But thanks for the offering.

from cordova-plugin-file-opener2.

jmrezayi2 avatar jmrezayi2 commented on July 20, 2024

Hey I see your point! But on the other hand most people are noobs

Okay, So this issue is closed. Thank you so much for being such a cool developer! I wish I could meet you in person and have a talk!

from cordova-plugin-file-opener2.

pwlin avatar pwlin commented on July 20, 2024

Thanks for your nice words! My email address is on my profile, you can always send me a mail and invite me to a coffee? ;)

Yes you are right that this plugin should be more noob-friendly. I added a link to known MIME-types in Notes section of README.md file. It will help to find the correct MIME-type people are looking for.

from cordova-plugin-file-opener2.

arathikundapur avatar arathikundapur commented on July 20, 2024

My app is getting re initialised when i use this plugin to open pdf files. Any work arounds? PS: This is on IOS 9. Same issue with cordova-open and the cordova launcher plugin too

from cordova-plugin-file-opener2.

pwlin avatar pwlin commented on July 20, 2024

@arathikundpur As the reinitialization also happens with other plugins, you would want to post a question in Phonegap discussion group

from cordova-plugin-file-opener2.

arathikundapur avatar arathikundapur commented on July 20, 2024

Sorry for distracting you... fileopener2 is actually crashing on ios9 and
not reinitializing.

here...

#import <UIKit/UIKit.h>

int main(int argc, char* argv[])

{

@autoreleasepool {

    *int retVal = UIApplicationMain(argc, argv, nil, @"AppDelegate");*

    return retVal;

}

}

Arathi

On Wed, Oct 7, 2015 at 3:43 AM, pwlin [email protected] wrote:

@arathikundpur https://github.com/arathikundpur As the reinitialization
also happens with other plugins, you would want to post a question in Phonegap
discussion group https://groups.google.com/forum/#!forum/phonegap

β€”
Reply to this email directly or view it on GitHub
#43 (comment)
.

from cordova-plugin-file-opener2.

PedroJusto avatar PedroJusto commented on July 20, 2024

Same problem here! fileopener2 just works fine at first time I open a document, at the second time it raises an exception at '@autoreleasepool'. I need to close my app to work again

from cordova-plugin-file-opener2.

PedroJusto avatar PedroJusto commented on July 20, 2024

@arathikundpur did you solve the problem?

from cordova-plugin-file-opener2.

pwlin avatar pwlin commented on July 20, 2024

I think this has something to do with the way your app is made, as other plugins cause the same problem.

try to put your @autoreleasepool inside a try catch and catch the error:

@autoreleasepool {
    @try {
         // do your stuff
     }
    @catch (NSException *exception) {
        // handle the exception   
    }

What kind of exception are you getting?

from cordova-plugin-file-opener2.

PedroJusto avatar PedroJusto commented on July 20, 2024

@pwlin can you confirm that in ios9 iPhone device works fine? in iPad works fine

from cordova-plugin-file-opener2.

pwlin avatar pwlin commented on July 20, 2024

@PedroJusto Unfortunately I have no iDevices to test it there. But if it works on iPad with iOS9, I don't see any reason why it shouldn't work on iPhone with iOS9.

from cordova-plugin-file-opener2.

PedroJusto avatar PedroJusto commented on July 20, 2024

thank you @pwlin , at the time I'm using "com.disusered.open" plugin wich seems to work fine in ios9

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.