Apple played an April Fools joke on developers. A few days ago I had to release a Link Unshortener update to fix the link-unshortener: custom URL scheme on macOS 15.4. The purpose of the scheme is to pass URLs to my app Link Unshortener. For example:
link-unshortener:https://example.org/
Consider the following Objective-C code:
NSURL * url = [NSURL URLWithString: @"link-unshortener:https://example.org/"];
NSURLComponents * components = [NSURLComponents componentsWithURL: url resolvingAgainstBaseURL: NO];
[components setScheme: nil];
NSLog(@"%@", [components string]);
More or less forever—I've tested all the way back to macOS High Sierra—the return value of the method [NSURLComponents string] was https://example.org/ in this case. However, unfortunately, the return value is now https%3A//example.org/ in macOS 15.4. For some reason, the : character has been percent-encoded. The new return value is not a valid URL, and thus Link Unshortener could not open it.
I've worked around the issue in the latest version of Link Unshortener, but why in the world did Apple change the longstanding behavior of a developer API in a "minor" OS update, without even a linked-on-or-after check? Whatever happened to binary compatibility? From the outside, it's difficult to determine whether the change was intentional or unintentional, e.g., a bug. My own theory is that it was an attempted fix for another bug. In any case, Apple really needs to be more careful. Things like this should not be breaking almost seven months after the release of macOS Sequoia. Isn't the OS supposed to become less buggy over time, not more?