Posts

Post not yet marked as solved
1 Replies
890 Views
While reviewing our app to prepare for macOS Monterey, I noticed an error when restoring purchased subscriptions. The error is issued via the following log method: - (void)paymentQueue:(SKPaymentQueue*)queue restoreCompletedTransactionsFailedWithError:(NSError*)error The error is the following: Error Domain=SKErrorDomain Code=0 "UNKNOWN_ERROR" UserInfo={NSLocalizedDescription=UNKNOWN_ERROR, NSUnderlyingError=0x600003c9b690 {Error Domain=ASDErrorDomain Code=950 "Unhandled exception" UserInfo={NSLocalizedDescription=Unhandled exception, NSLocalizedFailureReason=An unknown error occurred}}} Is this error known? Has the API for macOS Monterey changed? How can we solve that issue?
Posted Last updated
.
Post not yet marked as solved
0 Replies
833 Views
I have noticed that our app on macOS Monterey cannot find email files with .emlx or .eml extension stored in directories shared with the app. I am aware that email indexing on macOS Big Sur has migrated to Core Spotlight and thus can no longer be found via Spotlights. However, a metadata importer for the file formats is available under macOS Big Sur. So if files are in either file format and have been placed in a shared directory, they can be found via Spotlight. Under macOS Monterey I find that the full text of such files is not indexed. You can reproduce this behaviour with the following examples. Precondition: In one of the accessible directories, for example for documents, there is at least one file with the extension .emlx or .eml. The following query shows a list of emails in the user directory: mdfind -onlyin ~ "kMDItemContentTypeTree == 'public.message'" The following query returns the corresponding email with the filename 20.emlx: mdfind -onlyin ~ "* == '20.emlx' && kMDItemContentTypeTree == 'public.message'" The following query already returns no results. A tokenizing of the titles does not take place: mdfind -onlyin ~ "* == '20' && kMDItemContentTypeTree == 'public.message'" The following question does not return any results, although the word is contained in the text of an e-mail: mdfind -onlyin ~ "kMDItemTextContent == 'apple' && kMDItemContentTypeTree == 'public.message'" Does anyone know if the reason is that this is an early beta version or do we need to prepare for a helper solution, for example with SKSearch Kit?
Posted Last updated
.
Post not yet marked as solved
19 Replies
8.0k Views
Our app was rejected because of an outdated entitlement key. We have to use this key, because othervise our app won't. work.Our app makes use of the scripting bridge. I we follow the documentation, we should use the com.apple.security.automation.apple-events key. The app would prompt a dialogue to ask the user to grant access to apple events.In practice, I doeasn't work. We need to add com.apple.security.temporary-exception.apple-events for the particular app, we use scripting bridge for. If we do that, the system promts the dialogue as expected and the spcipting bridge wordls. I seems to be a bug of macOS. However we need to resolve the issue, because the app is rejected and the reviewer doesn't respond to our explanation. I don't understand the problem. The seucrity mechanism of macOS is working and the user experience is aligned with Apple's requirements. We just need to use the old entitlement as a workaround until Apple will fix this bug. We also want to be compatible with Sierra and High Sierra, which don't know the new entitlement, that is introduced with Mojave.Some ideas?
Posted Last updated
.
Post not yet marked as solved
1 Replies
493 Views
We need to parse emails in our app, that are sometimes encoded in NSISOLatin1StringEncoding instead of NSUTF8StringEncoding. Unfortunately the convenient method stringByReplacingPercentEscapesUsingEncoding for NSString objects is deprecated. The recommended method stringByRemovingPercentEncoding is not sufficient for our use case. How to transform NSString objects with iso-8859-1 encoding?
Posted Last updated
.
Post not yet marked as solved
0 Replies
545 Views
I have trained a text classification model with CreateML. I excited about the convenient tool and the precision of the model. However, there are some false positives. I realized, that the classification of the model has no probability parmater to decide, wether the app should take or drop the classification ot avoid false positives. Is there a way to get the probability value? Maybe I have to train the model in a different way? The model description in Xcode is quite clear: Text as input, classification string as output. Nothing more.
Posted Last updated
.
Post not yet marked as solved
0 Replies
513 Views
Our app accepts a dropped email, that was dragged from a list entry in the defa8lt Mail.app. This is not possible in Catalina Beta any more. While the app get the full email with sender, recipient, subject, data dn body in High Sierra, it's only the subject in Catalina Beta.We are using the following properties in the app's plist file:<key>CFBundleDocumentTypes</key> <array> <dict> <key>CFBundleTypeName</key> <string>Plain text</string> <key>LSHandlerRank</key> <string>Alternate</string> <key>CFBundleTypeRole</key> <string>Viewer</string> <key>LSItemContentTypes</key> <array> <string>public.text</string> </array> </dict> <dict> <key>CFBundleTypeName</key> <string>HTML</string> <key>LSHandlerRank</key> <string>Alternate</string> <key>CFBundleTypeRole</key> <string>Viewer</string> <key>LSItemContentTypes</key> <array> <string>public.html</string> </array> </dict> <dict> <key>CFBundleTypeName</key> <string>Contact</string> <key>LSHandlerRank</key> <string>Alternate</string> <key>CFBundleTypeRole</key> <string>Viewer</string> <key>LSItemContentTypes</key> <array> <string>public.contact</string> </array> </dict> <dict> <key>CFBundleTypeName</key> <string>General files and folders</string> <key>LSHandlerRank</key> <string>Alternate</string> <key>CFBundleTypeRole</key> <string>Viewer</string> <key>LSItemContentTypes</key> <array> <string>public.data</string> <string>public.directory</string> </array> </dict></array>Further more we use send types for a service provider. In a test app I tried all known pasteboard types. <array> <string>NSPasteboardTypeURL</string> <string>NSPasteboardTypeColor</string> <string>NSFileContentsPboardType</string> <string>NSFilesPromisePboardType</string> <string>NSPasteboardTypeFileURL</string> <string>NSFindPanelSearchOptionsPboardType</string> <string>NSPasteboardTypeFont</string> <string>NSPasteboardTypeHTML</string> <string>NSInkTextPboardType</string> <string>NSPasteboardTypeMultipleTextSelection</string> <string>NSPasteboardTypePDF</string> <string>NSPasteboardTypePNG</string> <string>NSPostScriptPboardType</string> <string>NSPasteboardTypeRTF</string> <string>NSPasteboardTypeRTFD</string> <string>NSPasteboardTypeRuler</string> <string>NSPasteboardTypeSound</string> <string>NSPasteboardTypeString</string> <string>NSPasteboardTypeTabularText</string> <string>NSPasteboardTypeTextFinderOptions</string> <string>NSPasteboardTypeTIFF</string> <string>NSVCardPboardType</string></array>Hopefully it's a bug and not another feature, tha tlimits the options for developers. Doeas someone knoe a workaround? Maybe we have to use another document type, that our acc could receive the raw mail data and parse it.
Posted Last updated
.
Post not yet marked as solved
0 Replies
409 Views
Our app uses a service provider to get a seleted email in default Mail.app. This works perfect in High Sierra but not with Catalina any more. The pasteboard in Catalina is empty. Here is a code snipped of our plist file, that defines the service provider:<dict> <key>NSKeyEquivalent</key> <dict> ... </dict> <key>NSMenuItem</key> <dict> ... </dict> <key>NSMessage</key> <string>...</string> <key>NSPortName</key> <string>...</string> <key>NSRequiredContext</key> <dict> <key>New item</key> <string></string> </dict> <key>NSSendTypes</key> <array> <string>public.plain-text</string> <string>public.rtf</string> <string>public.contact</string> <string>NSURLPboardType</string> <string>NSFilenamesPboardType</string> <string>NSFilesPromisePboardType</string> <string>NSPasteboardTypeURL</string> <string>NSPasteboardTypeFileURL</string> <string>NSRTFDPboardType</string> <string>NSPasteboardTypeMultipleTextSelection</string> <string>NSPasteboardTypePDF</string> </array></dict>Maybe we have to add another pasteboard type? Or is this behaviour another bug or even feature of Catalina? Has someone an idea?
Posted Last updated
.
Post not yet marked as solved
2 Replies
1.9k Views
I would lime to read the content of a selected note with AppleScript. Here is the simplified script:using terms fromapplication "Notes" tell application "Notes" log selection log (count of selection) log item 1 of selection set theNote to item 1 of selection log name of theNote end tell endusing terms fromUnfortunately I get the error message. Here is the log output:(*selection*) (*1*) (*item 1 of selection*) Result: error "Notes got an error: Can’t make item 1 of selection into type specifier." number - 1700 from item 1 of selection to specifierHas someone an idea?
Posted Last updated
.
Post not yet marked as solved
16 Replies
7.2k Views
Spotlight search for emails neither works with MDQueryRef nor with mdfind in the Terminal.app even if the user has granted full disc access for the app in the security settings. The application logic of our app works for High Sierra bot not for Catalina any more. Is this a bug or a feature? Hopefully it's not a feature. Other content like documents, calendar events and contacts can be retrieved by MDQueryRef. If I search with the default Spotlight interface (command-space), I can find emails. But even if I select "Show in Finder" in the result list, the Finder window is empty. Even with sudo mdfind, I can't find any email. I also can't add an email to the index with mdimport to the index, neither with the logged in user nor with sudo. Does someone has a solution? Hopefully we needn't index emails With Search Kit on our own in the future.
Posted Last updated
.
Post not yet marked as solved
2 Replies
672 Views
Our app uses a NSUserAppleScriptTask to capture the users context and provide contextual content. While our approach works fine for macOS High Sierra, the app thriws an error with macOS Catalina:Script execution failed: The operation couldn’t be completed. /Users/.../Default.scpt: script error: Unknown AppleEvent address type. (-1716)If we call the script with the Script Editor everything is fine. I assume we have to use different parameters for the NSAppleEventDescriptor for macOS Cataline. Here is the relevant code snipped:NSAppleEventDescriptor *paramter = [NSAppleEventDescriptor listDescriptor]; [paramter insertDescriptor:[NSAppleEventDescriptor descriptorWithString:bundleId] atIndex:0]; NSAppleEventDescriptor *event = [NSAppleEventDescriptor appleEventWithEventClass:kASAppleScriptSuite eventID:kASSubroutineEvent targetDescriptor:nil returnID:kAutoGenerateReturnID transactionID:kAnyTransactionID]; [event setDescriptor:[NSAppleEventDescriptor descriptorWithString:@"getContext"] forKeyword:keyASSubroutineName]; [event setDescriptor:paramter forKeyword:keyDirectObject]; NSUserAppleScriptTask *script = [[NSUserAppleScriptTask alloc] initWithURL:scriptURL error:&fileError]; ... [script executeWithAppleEvent:event completionHandler:^(NSAppleEventDescriptor * _Nullable result, NSError * _Nullable error) { ... }Apples error documentation says:-1716The target address type of an Apple event is unknownI think, Cataline doesn't accept, that the targetDescriptor parameter is nil. However the developer documentation says:A pointer to a descriptor that identifies the target application for the Apple event. Passing nil results in an Apple event descriptor that has no keyAddressAttr attribute (it is valid for an Apple event to have no target address attribute).Has someone any idea for a solution?
Posted Last updated
.
Post not yet marked as solved
1 Replies
960 Views
Our app uses Apple Script to communicate with other installed apps. If a user hasen't installed one of these apps, that are part of the script, the system shows a dialogie to select the missing app. The script never troes to script an app, if the app is not installed. However, the dialog is triggered, when the Apple Script is loaded. How can we suppress this dialogue?
Posted Last updated
.