Skip to content

Commit

Permalink
removing type identifier, because files of type "text/plain" was not …
Browse files Browse the repository at this point in the history
…handled correct in Shortcuts.app. Instead of using text content, file name was used. Maybe this is a bug in iOS and will be submitted as bug report to Apple
  • Loading branch information
hosy committed Sep 23, 2019
1 parent 727d931 commit 3fd6f92
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ownCloudAppShared/Intent/GetFileIntentHandler.swift
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public class GetFileIntentHandler: NSObject, GetFileIntentHandling {
if error == nil {
if let item = item, let file = item.file(with: core) {
if let url = file.url {
let file = INFile(fileURL: url, filename: item.name, typeIdentifier: item.mimeType)
let file = INFile(fileURL: url, filename: item.name, typeIdentifier: nil)

self.completion?(GetFileIntentResponse.success(file: file))
self.completion = nil
Expand All @@ -63,7 +63,7 @@ public class GetFileIntentHandler: NSObject, GetFileIntentHandling {
} else {
if let core = core, let file = item.file(with: core) {
if let url = file.url {
let file = INFile(fileURL: url, filename: item.name, typeIdentifier: item.mimeType)
let file = INFile(fileURL: url, filename: item.name, typeIdentifier: nil)

self.completion?(GetFileIntentResponse.success(file: file))
self.completion = nil
Expand Down

0 comments on commit 3fd6f92

Please sign in to comment.