ios-app icon indicating copy to clipboard operation
ios-app copied to clipboard

[feature/disallow-extensions] Add option to disallow extensions, show action for unviewable filetypes

Open felix-schwarz opened this issue 3 years ago • 1 comments

Description

This pull request adds to new features:

  • the ability to disallow extensions via the new extensions.disallow MDM/branding option
  • displays a fallback action (Open in) in case no suitable viewer is available for a filetype

Example

To block the QuickLook preview and webview viewer extensions, this would need to be added to the Branding.plist

<key>extensions.disallowed</key>
<array>
    <string>org.owncloud.ql_preview</string>
    <string>org.owncloud.webview</string>
</array>

Related Issue

https://github.com/owncloud/enterprise/issues/5308

Screenshots (if appropriate):

Previously Now Now when tapping the button
Bildschirmfoto 2022-08-22 um 12 54 17 Bildschirmfoto 2022-08-22 um 14 43 09 Bildschirmfoto 2022-08-22 um 14 43 12

Types of changes

  • [ ] Bug fix (non-breaking change which fixes an issue)
  • [x] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • [ ] My code follows the code style of this project.
  • [ ] My change requires a change to the documentation.
  • [ ] Added an issue with details about all relevant changes in the iOS documentation repository.
  • [ ] I have read the CONTRIBUTING document.
  • [ ] I have added tests to cover my changes.
  • [ ] All new and existing tests passed.
  • [ ] Added changelog files for the fixed issues in folder changelog/unreleased

felix-schwarz avatar Aug 22 '22 12:08 felix-schwarz

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

:white_check_mark: hosy
:x: felix-schwarz
You have signed the CLA already but the status is still pending? Let us recheck it.

CLAassistant avatar Aug 22 '22 12:08 CLAassistant

Merged into #1162. No longer destined to be merged in 11.x outside of special builds.

felix-schwarz avatar Oct 11 '22 20:10 felix-schwarz

QA checks:

  • [x] extensions.disallowed
    • [x] quicklook -> tested with office files
    • [x] webview -> html, css, gif, json, x-php
  • [x] excluded system activities
    • [ ] Add to reading list
    • [x] Copy to pasteboard
    • [x] Print
    • [x] Save to camera roll (displayed as Save Image)
    • [x] Mail
    • [x] Messages
    • [x] Assign to contact
    • [x] AirDrop
    • [x] Open in (i)Books
    • [x] Markup as PDF
  • [x] Open in when preview is not available

jesmrec avatar Oct 20 '22 08:10 jesmrec

Feature working fine, but two SystemActivities i was not able to work with:

  • com.apple.UIKit.activity.AddToReadingList. As the Apple documentation states: When using this service, you can provide an [NSURL](https://developer.apple.com/documentation/foundation/nsurl) object whose contents uses the http or https scheme that points to the page to add.

Not clear which kind of file applies to that or how to reproduce correctly

  • com.apple.UIKit.activity.OpenInIBooks: tested with an eBook file (.epub format). Open in shows the Apple's Books app with
<key>action.excludedSystemActivities</key> 
  <array>
    <string>com.apple.UIKit.activity.OpenInIBooks</string>
  </array>
Screenshot 2022-10-20 at 13 22 47

Mechanism is pretty correct, just commented these two cases as non-reproducible.

jesmrec avatar Oct 20 '22 11:10 jesmrec

The documentation on Apple's side may not be complete - or excluding Apple Books not being possible a system limitation. Thanks for documenting this.

I'm closing this PR as it has been merged into #1162.

felix-schwarz avatar May 15 '23 14:05 felix-schwarz