Post

Replies

Boosts

Views

Activity

fireDate and repeatInterval for UNNotificationRequest
With UILocalNotification it was possible to set both fireDate and repeatInterval in a manner that you could schedule a notification firing every day starting next month. Now that UILocalNotification is deprecated, I can't seem to find a way to replicate this behavior using the available UNNotificationsRequest triggers. Is there any way I could possibly do this?
6
0
824
Mar ’22
Hide Share extension from UIActivityViewController when user selects a directory
I'm looking to hide my app extension from the UIActivityViewController when a user selects a directory. I have tried through specifying the dictionary on NSExtensionActivationRule with the available keys, but it seems that there is no key that considers directories: NSExtensionActivationSupportsAttachmentsWithMaxCount NSExtensionActivationSupportsAttachmentsWithMinCount NSExtensionActivationSupportsFileWithMaxCount NSExtensionActivationSupportsImageWithMaxCount NSExtensionActivationSupportsMovieWithMaxCount NSExtensionActivationSupportsText NSExtensionActivationSupportsWebURLWithMaxCount NSExtensionActivationSupportsWebPageWithMaxCount As an alternative I'm using the string option, providing the following predicate that considers up to 5 files, 5 images, 1 video and 0 directories: SUBQUERY ( extensionItems, $extensionItem, SUBQUERY ( $extensionItem.attachments, $attachment, ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.movie" ).@count <= 1 AND SUBQUERY ( $extensionItem.attachments, $attachment, ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.image" ).@count <= 5 AND SUBQUERY ( $extensionItem.attachments, $attachment, ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.file-url" ).@count <= 5 AND SUBQUERY ( $extensionItem.attachments, $attachment, ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.directory" ).@count == 0 ).@count >= 0 The predicate works for the video, image and file limitations, but when it comes to directories, the extension keeps appearing. Is there any way to achieve this?
0
0
652
Jan ’22