IOS FolderItem.Launch alternative

  1. 10 months ago

    Roger S

    15 Feb 2017 Pre-Release Testers, Xojo Pro

    I am programming an IOS app with Xojo where I download documents as pdf, excel, etc. on the IOS device in the SpecialFolder.Documents .

    In the other platforms, it is possible to launch the document using FolderItem.Launch. It seems not possible in Xojo IOS.
    Probably, there is a Declare that can replace it which I would like to know if it exists. In this case, It would do like an "Open in" and it gives you a list of possible apps to use.
    -Or-
    The other option would be to use a free tool like File Manager which is available via App Store.
    In that case, the problem would be to copy the downloaded files directly into this app. Is there a way to copy files from an App to another without access rights problems?

  2. Jason K

    15 Feb 2017 Pre-Release Testers

    @Claude SPierre Is there a way to copy files from an App to another without access rights problems?

    Is it your own app you would be copying to? If so there is bundle entitlements magic you can do so they can share documents. Otherwise you'll have to use an iOSSharingPanel or UIActivityViewController from iOSKit.

  3. Roger S

    15 Feb 2017 Pre-Release Testers, Xojo Pro

    No, it would be a copy to another app called File Manager available on the App Store.
    I will try to find documentation on IOSSharingPanel and UIActivityViewController.

  4. Jason T

    15 Feb 2017 Pre-Release Testers, Xojo Pro Sydney, Australia
    Edited 10 months ago

    I have a similar requirement, but in my case I don't want to share a PDF with another app - I just want it to open when the user taps on it using the in-built iOS PDF viewer. An example is the Dropbox app or the Mail app - if you see a PDF and tap on it, it just opens. So ... is there another way to do FolderItem.Launch on iOS without using the sharing panel?

  5. Derk J

    15 Feb 2017 Pre-Release Testers, Xojo Pro

    Showurl or something?

    pdf://
    com.company.app://

    Use apple uri handlers for opening/showing files

  6. Jason K

    15 Feb 2017 Pre-Release Testers

    @Jason T Should be possible using the QLPreviewController if I'm not mistaken, but I'm not going to be able to look into it for at least a week.

  7. Jason T

    15 Feb 2017 Pre-Release Testers, Xojo Pro Sydney, Australia

    Thanks team. I don't see a way to do it with ShowURL but @Jason K from what I've just read, QLPreviewController is definitely the way to do it if the PDF isn't online (which it isn't in my case). So if you do get around to this, it would be very much appreciated. :)

  8. Roger S

    16 Feb 2017 Pre-Release Testers, Xojo Pro

    Yes, It would be great to use QLPreviewController as suggested. It would be very much appreciated. In the meantime, I will go though the documentation to see if there's other alternatives.

  9. Roger S

    20 Feb 2017 Pre-Release Testers, Xojo Pro

    I have also seen in my research that there is a reference to UIDocumentInteractionController. Because I am not an expert in Swift or Xcode, I don't know what to do to use it.

or Sign Up to reply!