-
Weird Bug Around Sharing to Reminders on macOS and iOS
On both iOS and macOS, if you share an item via the share sheet or share popover to Reminders, Unread will offer to create a reminder. Interestingly, if the window or view offering the item has a current NSUserActivity, the default reminder title will be the title of that current NSUserActivity.
You can see this from Safari:
- Open https://www.goldenhillsoftware.com
- Find the link to Feedly.
- Long press that link on iOS, or right click that link on macOS.
- Choose “Share…” from the resulting context menu.
- Choose “Reminders” from the share sheet or share popover.
Expected result: If the reminder has a default title, it would be “New Reminder”, “Feedly”, or “Feedly: Track the topics and trends that matter to you” (the title of the linked page).
Actual result: The default title is “Unread: An RSS Reader” – the title of the page with the link.
I filed this as
FB15271013
, along with a sample project demonstrating that the title is coming from the NSUserActivity. The sample project has a UIActivityItemSource that offers better titles in itssubjectForActivityType
function and itsactivityViewControllerLinkMetadata
function. -
On iOS 18, saving an article to Safari Reading List (via the SSReadingList API) sometimes just does nothing. The user does not even get the alert prompting for permission to add a URL to Safari Reading List. The API call returns without throwing an exception. I filed
FB15190050
with more info. -
I released Unread 4.2 with iOS 18 features, and with new optional toolbar buttons and keyboard shortcuts on Mac.
www.goldenhillsoftware.com/2024/09/u…
Unread is an RSS reader with beautiful typography and a variety of color themes.
-
Tuesday is election day here in Massachusetts. An added benefit to voting now is the assurance that your voter registration is in good order for the November election.
-
Today is the first day of early voting for the Massachusetts state primary.
-
This is a good article by Jason Snell about macOS permissions checking being out of balance. The excessive permission checking is probably the most frustrating aspect of using a Mac.
-
I released Unread for Mac! Unread is an RSS reader with beautiful typography, color themes, and more. Unread has a long history on iPhone and iPad, and is now also available for Mac.
-
In 2020 President Biden saved democracy by defeating Trump. Now he is continuing to save democracy by passing the torch.
-
A deer in my back yard.
-
Once again the Supreme Court reminds us why we need to keep Trump out of office.
-
iOS Home Screen Personalization and Alternate Icons
iOS 18 lets each app supply a light mode, dark mode, and tinted version of its icon. iOS also allows an app to let a user choose an alternate icon – letting customers personalize how an app appears on their home screen. While both capabilities are great, this combination of features does not appear to mix well.
If an app has several icon options that vary only by color combination, it seems natural to let the user choose one option for light mode and another for dark mode. But there is no way to do this without providing n2 app icon entries in the asset catalog. It also seems like the tinted icon should be the same for each option when they only vary by color combination. But the only way for several icon options to use the same tinted variant is to copy the same PNG into each app icon asset catalog entry.
My ideal solution to this would be a new
setAlternateIconName
method onUIApplication
that accepted 3 different parameters: a light mode icon name, a dark mode icon name, and a tinted icon name. Alternatively asetAlternateIconNameForDarkMode
method and asetAlternateIconNameForTinted
method could work. I filed FB13999626 requesting this.For context, this is Unread’s screen letting the user choose an alternate icon. There are 32 different options that vary only by color scheme. I ideally want to let the user choose one for light mode and one for dark mode, and have the tinted variation be the same regardless.
-
I am excited about text entry suggestions in AppKit.
-
CocoaHeads Boston will meet via Zoom tomorrow (Thursday) evening at 7:00 PM Boston time. New participants and participants from outside the Boston area are always welcome. www.meetup.com/cocoahead…
-
Preparing for the macOS Beta
As soon as the new beta of macOS is out, I want to install it and use it as much as possible. But I also want my Sonoma installation to remain intact with my data – as a fallback, and because we will probably be unable to submit Mac apps from the beta to App Store Connect.
It took me some time to determine how to set this up. I ended up doing this:
- Create a new APFS volume.
- Download the Sonoma installer from the Mac App Store.
- Install Sonoma on the new volume.
- Boot into the new volume, and use Migration Assistant to copy my data from the other volume.
I now have a “Sonoma” volume and a “macos2024” volume.
-
Noah Martin is organizing a WWDC keynote viewing event at Shy Bird in South Boston.
-
Guilty on all counts. ⚖️
-
Interesting Bug Pertaining to NSTableView and Context Menus
I am seeing what I believe to be an interesting bug on macOS 14.5 (23F79).
If you have an
NSTableView
with a context menu, opening that context menu via right click while the app is in the background and then clicking elsewhere in the table view to dismiss the context menu brings the window to the foreground (as expected). However the table view will not respond to any clicks until the app is moved to the background and brought back into the foreground.I see this behavior in Apple Mail, the Finder, and in other apps including my own. To reproduce this:
-
Check out this sample app using
git clone https://github.com/jbrayton/ActivateBug.git
. Observe that it creates a simpleNSTableView
with three rows. Run the app. -
Click the table view rows. Observe that they can be selected by clicking them as you would expect. Right-click in the table view and observe that you get a context menu.
-
Open Safari. Keep the two windows next two each other on the same screen. Make Safari the active app.
-
Right-click in the table view of the sample app.
-
Dismiss the resulting context menu by clicking elsewhere in the table view.
-
Try to select other rows by clicking them.
Expected result: I would expect clicking a table row to select it.
Actual result: Clicking in the table view has no effect.
Possibly related: If the
NSApplicationDelegate
has anapplicationDidBecomeActive
method, I would expect it to be called when bringing an app to the foreground following these steps. It is not.This video demonstrates the issue with my sample app:
This video demonstrates the issue using Apple Mail:
I filed this as FB13806870.
I can think of a couple possible workarounds, but neither is great:
-
Create a local NSEvent monitor for
.rightMouseDown
events that callsNSApplication.shared.activate()
. But this method “doesn’t guarantee app activation”, so this will only work sometimes. -
Similarly create a local NSEvent monitor for
.rightMouseDown
events that simply ignores right clicks by returningnil
when the app is in the background. But that would result in context menus simply being unavailable when the app is in the background.
-
-
I won a copy of @patrickrhone’s book For You at Micro Camp (@camp). Thank you to Patrick and to the Micro.blog team!
-
Congratulations to Joe Fabisevich on the launch of Plinky. Plinky is a wonderful app for saving, organizing, and sharing links.
-
NSHappyHour will meet at The Lobster Shanty in Salem MA at 6:30 PM Wednesday. New folks are always welcome. Thanks to Geoff Bradford for organizing it.
-
This does not look ideal. I reported it to the electric company.
-
NSHappyHour meets tonight at Bit Bar in Salem MA at 6:30 PM. New folks are always welcome. Thanks to @whitedonkey@mastodon.social for organizing.
-
I failed at Wordle two days in a row. Not April Fools, unfortunately. 🤦♂️
-
Saving to Safari Reading List
Unread lets a user save articles and links directly to Safari Reading List, without going through the share sheet. This is a popular feature, but there are unfortunate limitations on both iOS and macOS.
iOS
On iOS, SSReadingList lets an app save a webpage URL to Safari Reading List. This initially worked well. But in iOS 13.4 a confirmation dialog was added. Every time an app saves a webpage URL to Safari Reading List, the system displays an alert asking the user for permission.
I assume this is intended to prevent rogue apps from filling a user’s Safari Reading List with junk. But there needs to be a way for a user to indicate that they trust an app to write to Safari Reading List without being prompted every time.
I filed FB7573628 in February 2020 (over four years ago) requesting this.
Honestly if the alert had existed when I first added the ability to save an article to Safari Reading List, I would not have added this functionality to Unread. The alerts are obnoxious.
macOS
SSReadingList is not available to macOS apps, but an Add to Safari Reading List Sharing Service can save a webpage URL to Safari Reading List. On macOS this has the side effect of Safari coming to the foreground. The user experience would be much better if Safari stayed in the background. I filed FB13682568 with a sample project requesting this.
Apple could make the experience of saving to Safari Reading List from an app much better by addressing these issues. I hope that they will.
-
Sharing via Email on macOS
On iOS Unread has a Mail Content article action. This lets customers quickly compose an email with the HTML content of an article. It uses MFMailComposeViewController. MFMailComposeViewController has the unfortunate limitation of only working with Apple Mail, but it is otherwise great. The Mail Content article action is popular with my customers.
macOS has a Compose Email Sharing Service, making it easy for an app to ask the system to create an email message with a recipient, subject, and message body. I was excited to find that this service works with the user’s default email client. It is not limited to Apple Mail.
The Compose Email Sharing Service can accept either a plain text string, or an attributed string with formatting and embedded images.
But after spending more time working with the Compose Email Sharing Service, I was disappointed by some of its weaknesses.
Bugs Around Embedded Images
When sharing articles as rich text, I found that embedded images often get moved to the end of the article. I was able to generate a simple test case – an attributed string with an embedded image at the beginning of it. If I share that attributed string with the sharing service, Apple Mail will generate a message with the image moved to the end. I filed FB13668576 documenting this.
Plain Text Messages
If Apple Mail’s Message format setting (under the Composing pane of the Apple Mail settings window) is set to Plain Text, outgoing messages created using the sharing service are converted to plain text. All formatting and embedded images are lost. Arguably that is the correct behavior because it honors the user’s message format setting.
However a bigger problem is that there is no spacing between paragraphs. The resulting message for a multi-paragraph article is a wall of text. If Unread had a way to determine whether Apple Mail’s message format setting was plain text, Unread could add its own blank lines between paragraphs. But since I cannot find a way to get that information from a sandboxed Mac app, I can either share an attributed string with formatting and embedded images or I can share a plain text string with my own Markdown-like formatting. I cannot do both.
Third Party Email Apps
When the user’s default email client is something other than Apple Mail and an app sends an attributed string, the email client just gets the plain text. The plain text version of the string will also lack basic plain text formatting such as blank lines between paragraphs.
Scripting Apple Mail Directly
I considered trying to send an Apple Event to Apple Mail, hoping that I could simply tell Apple Mail to create an outbound email message with specific HTML content. However the sdef for Apple Mail states that setting the html content attribute of an outgoing message has no effect. The setting is deprecated. My testing confirms that setting that attribute has no effect.
Feedback Reports
I filed these feedback reports
- FB13668659: .composeEmail NSSharingService - Multiple paragraphs, Plain Text Message Format
- FB13669961: Formatting lost when sharing multi-paragraph attributed strings to third party email clients via the .composeEmail NSSharingService
- FB13668576: When creating an email using the .composeEmail NSSharingService using an attributedString, images are moved to the bottom of the message
Related Performance Tip
I find using
NSWorkspace.shared.open(URL)
with a mailto: URL instead of the Compose Email Sharing Service to be about twice as fast for sending plain text email.
subscribe via RSS