Post

Replies

Boosts

Views

Activity

Can't open file user granted access to.
Our app has a note section that allows you to drag and drop an email to it. Our app then adds a link to the note, that when clicked, will open the email again. Currently andy email dragged from the mail.app doesn't have a problem. Works fine. The issue is with other mail clients at least with Outlook. When a user drags and drops an email from Outlook, we add the link, and if you click the link it will open fine. The problem is that this only works as long as you don't close our app. If you close our app, re-open and click the Outlook email link, we get a permission error. The application “DragAndDropEmails” does not have permission to open “Re- Customize Login- Registration Form.eml.” “NSCocoaErrorDomain” - code: 256 “NSURL” : “file:///Applications/Microsoft%200utlook.app/” “NSLocalizedDescription” : “The application “Microsoft Outlook” could not be launched because a miscellaneous error occurred.” “NSUnderlyingError” : domain: “NSOSStatusErrorDomain” - code: 18446744073709551562 When a drop is made to the text view we check for an email drop like this: private func checkForEmailDrop(_ pasteboardItems: [NSPasteboardItem]?) -> Bool { for item in pasteboardItems ?? [] { for type in item.types { switch type.rawValue { // When using Apple Mail, the following type is returned. case "com.apple.mail.PasteboardTypeMessageTransfer": if let itemURL = item.string(forType: .URL) { if let url = URL(string: itemURL){ // Get the email subject. let subjectName = item.string(forType: .string) self.textStorage?.op1InsertMailMessageLink(withURL: url, subjectText: subjectName) return true } } // When using Outlook, the file promise type is returned and then we must also check to make sure the file is a .eml file (email file). case "com.apple.NSFilePromiseItemMetaData": if let itemFileURL = item.string(forType: .fileURL) { if let itemURL = URL(string: itemFileURL) { if itemURL.pathExtension == "eml" { // Get the email subject. let subjectName = itemURL.deletingPathExtension().lastPathComponent self.textStorage?.op1InsertMailMessageLink(withURL: itemURL, subjectText: subjectName) return true } } } default: break } } } return false } When the user clicks the link, we open it like this: let configuration = NSWorkspace.OpenConfiguration() let urlWithScheme = url.psoAddingSchemeIfNeeded() let appURLWithScheme = appURL.psoAddingSchemeIfNeeded() print(urlWithScheme) print(appURLWithScheme) NSWorkspace.shared.open([urlWithScheme], withApplicationAt: appURLWithScheme, configuration: configuration) { app, error in if let error = error { print("Failed to open link in specific app: \(error.localizedDescription)") } } contents of urlWithScheme: "file:///Users/joseines/Library/Containers/com.microsoft.Outlook/Data/tmp/FB810D5A-D544-46D9-9BD0-65067A3D7DE4/Re-%20Customize%20Login-%20Registration%20Form.eml" contents of appURLWithScheme: file:///Applications/Microsoft%20Outlook.app/ How can we let the system know that the user wants access to this file? How can we open the file after a restart?
1
0
312
Jul ’24
Xcode Cloud: Could not resolve package dependancies.
I'm getting the same error on my apps: Resolve Package Graph xcodebuild: error: Could not resolve package dependencies:   a resolved file is required when automatic dependency resolution is disabled and should be placed at /Volumes/workspace/repository/Opus One.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved   fatalError I have the Lottie as a Swift Package, but the Xcode cloud docs say that it should be automatic since its public. So, I'm looking for any possible hints as to what to look for or how to debug this issue. Thank you.
3
0
11k
Jan ’22
Remove padding on NSTableView / Big Sur with style = .fullWidth
Big Sur added a new property *style*, that defaults to automatic. Even though I'm setting it to full width, I can still see a difference between my app running on Xcode 12.1 vs 12.2   When debugging the interface I can see that the edges contain the table row. Which means that the cell is not occupying the entire full width of the row.  Please let me know if there is a way to get a single cell view to expand the entire tableview width.
8
0
3.9k
Nov ’20
Allow free access to paid users from another third party app.
Hi,My app is a pay to download app, and I'm being asked if its possible to allow free access to paid users from another app.The other app will be providing me with an api that will give access to users with passwords, so I was thinking of making another app with the same content with a user/password wall to give access.Does anyone know if this is allowed ?Thank you ,- Jose.
1
0
1.5k
Apr ’20