Apple's neglected OS

I've been developing Mac apps for nearly 25 years under the Dejal banner. It's a great platform, and an ever-improving OS.

Except when it isn't.

Sometimes, I encounter serious issues that make me think that it isn't getting the attention it deserves from Apple. Sure, each year they add lots of useful new features, and hundreds of APIs... but there are often huge fundamentally broken problems that don't get addressed.

I just encountered another mysterious bug that Apple says has no workaround, so I thought I'd take a moment to mention some that particularly bother me. Again, I really like Macs and Mac OS X, and primarily develop for it (along with iOS and watchOS), so I wish these issues would be fixed. I have, of course, filed Radar bug reports for all of these.

Here are my top three, all of which Apple has said there is no workaround, but are causing serious issues for lots of people. Please feel most welcome to file duplicates of these if they bother you too.

#22446403: SMLoginItemSetEnabled often launches an agent outside the app bundle

This one is particularly annoying for my Time Out break reminder app, as the Mac App Store edition is sandboxed, so using SMLoginItemSetEnabled is (I believe) the only supported way to launch a helper.

SMLoginItemSetEnabled is documented to:

Enable a helper application located in the main application bundle's Contents/Library/LoginItems directory.

But it often doesn't work as expected. It will often launch another copy of the agent elsewhere on the Mac, e.g. in the build or DerivedData folder, or in another copy of the app, etc.

This is a serious issue, particularly for developers, but potentially also for users who like to keep multiple versions (in case the want to revert). Launching an agent from an older version of the app leads to incorrect behavior.

I previously mentioned this issue on Stack Overflow.

Steps to Reproduce:
1. Have more than one copy of an app containing a login item.
2. Call SMLoginItemSetEnabled for the login item.

Expected Results:
The login item contained within the app bundle (at Contents/Library/LoginItems) will be launched.

Actual Results:
Sometimes a login item from another copy of the app (or in the build folder) will be launched.

#23114308: "Setting TCC failed" error accessing accounts

This one affects my Simon server monitoring tool, and prevented including a Twitter action in Time Out.

There is a widespread bug in 10.11 that gives this error when attempting to access accounts, e.g. with code such as this:

ACAccountStore *accountStore = [ACAccountStore new];
ACAccountType *accountType = [accountStore accountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierTwitter];
[accountStore requestAccessToAccountsWithType:accountType options:nil completion:^(BOOL granted, NSError *error) ...

I get the error:

Error Code=1 "Setting TCC failed." UserInfo={NSLocalizedDescription=Setting TCC failed.}

See a developer forum thread that discusses it, and includes a sample project.

This is a serious issue that is preventing existing apps and new apps from accessing Twitter and other services.

Steps to Reproduce:
Run the project in that forum post.

Expected Results:
Access is granted.

Actual Results:
"Setting TCC failed" error.

#25691051: Pasteboard stops working for some customers

This is one I encountered recently, and reported today. It affects some Time Out customers, fortunately fairly rare, but annoying.

Some users have reported that after some time their pasteboards stop working: copy/paste and dragging. The only solution is to restart the Mac.

I haven't experienced this myself, but I have had a few reports, and at least one of the users has offered to help test any fixes.

When the issue occurs, the following line appears in the Console (for pretty much every running app):

CFPasteboardCreate(CFAllocatorRef, CFStringRef) : Lock timeout

I can't think of anything I do in the app that could cause a pasteboard issue; it doesn't do much in related areas.

This issue isn't unique to my apps; a Google search reveals other examples, e.g.

Steps to Reproduce:
I can't reproduce, but have a customer who can help.

Expected Results:
Pasteboard keeps working.

Actual Results:
Pasteboard stops working, with the above-mentioned error.

Surely we can do better

It's often been said, especially in recent years, but maybe Apple just needs to slow down. Instead of spreading themselves too thin with major annual updates, not to mention new OS platforms, maybe everyone would be better served with a slower pace. Perhaps fewer user features and API changes, and more focus on improving the quality of what's already there.

Fundamental things like reliably launching helpers, accessing Twitter accounts, and a functioning clipboard should not be low priorities. They should be urgent priorities that get fixed before adding new features.

Please, Apple.