The Robservatory

Robservations on everything…

 

Apple Universe

Top-level category for all Apple, Mac, and OS X related topics.

View app-specific log messages in Terminal

March 29 2018 Update:

When this tip was first posted, it didn’t work right: The log command ignored the --start, --end, and --last parameters. Regardless of what you listed for parameters, you’d always get the entire contents of the log file. I’m happy to note that this has been resolved in macOS 10.13.4, as log now functions as expected:

$ log show --last 20s --predicate 'processImagePath CONTAINS[c] "Twitter"'
Filtering the log data using "processImagePath CONTAINS[c] "Twitter""
Skipping info and debug messages, pass --info and/or --debug to include.
Timestamp                       Thread     Type        Activity             PID    TTL  
2018-03-30 09:26:15.357714-0700 0xc88a8    Default     0x0                  5075   0    Twitterrific: (CFNetwork) Task <9AD0920A-7AE7-4313-A727-6D34F4BBE38F>.<250> now using Connection 142
2018-03-30 09:26:15.357742-0700 0xc8d7a    Default     0x0                  5075   0    Twitterrific: (CFNetwork) Task <9AD0920A-7AE7-4313-A727-6D34F4BBE38F>.<250> sent request, body N
2018-03-30 09:26:15.420242-0700 0xc88a8    Default     0x0                  5075   0    Twitterrific: (CFNetwork) Task <9AD0920A-7AE7-4313-A727-6D34F4BBE38F>.<250> received response, status 200 content K
2018-03-30 09:26:15.420406-0700 0xc8d7a    Default     0x0                  5075   0    Twitterrific: (CFNetwork) Task <9AD0920A-7AE7-4313-A727-6D34F4BBE38F>.<250> response ended
 --------------------------------------------------------------------------------------------------------------------
Log      - Default:          4, Info:                0, Debug:             0, Error:          0, Fault:          0
Activity - Create:           0, Transition:          0, Actions:           0
$

This makes it really easy to get just the time slice you need from the overly-long log files. You can use s for seconds, m for minutes, h for hours, and d for days as arguments to these parameters.

This article provides a nice overview on interacting with log and predicates to filter the output—there’s a lot you can do to help figure out what might be causing a problem.

And now, here’s the rest of the original post…

(more…)

Sorting—or not—bookmarks in Safari in macOS 10.13.4

One of the unpublicized nuggets in macOS 10.13.4 is this little doozy in the release notes:

Enables sorting Safari bookmarks by name or URL by right-clicking and choosing ‘Sort By…’

This has been a feature request for nearly as long as Safari has existed—Safari was released in January 2003, and I found this MacRumors forum thread from April 2003 asking how to sort bookmarks. So this feature was nearly 15 years in the making!

Sure enough, right click on an entry in your Bookmarks list, and you can sort by name or URL:

I have a junk drawer in Safari where I bookmark stuff that I might someday want. Like a real junk drawer, it gets filled pretty quickly, and sorting the entries is a great way to trim the out of date entries. But when I tried to sort my junk drawer…

…there was no such option available. Stumped for a moment, it struck me that there may be a limit on the number of entries, as that was the only difference between this folder and others. I removed half the entries, leaving 546, but still, no Sort entry in the contextual menu.

After a bunch of back-and-forth moving (which takes some time, when you move hundreds of bookmarks around), I found the limit: 450 entries.


So if you have a large folder of bookmarks in Safari that you need to sort, you’ll have to split it into multiple folders, none of which can have more than 450 entries. Weird but true.

How to rename dropped pins in macOS Maps

Today I wanted to do something that seemed simple: Add a pin to Apple’s Maps app on macOS High Sierra, then rename the pin.

But after trying everything obvious, I was stumped, and took to both Twitter and web searching. About the same time I found the answer on the web, I also received a tweet from @tmneff with the same answer.

This seems absolutely crazy, but here’s how you name a dropped pin in Maps on macOS—these are just the instructions from the linked web page, with a few added screenshots:

  1. Drop the pin.

  2. When the info box appears, click the small circled ‘i’ at the right.

  3. In the new window that appears, click the heart (Favorite) icon, to make your new pin a favorite.

  4. Click in the search bar, then highlight the Favorites entry and click it.

  5. When the list of favorites appears, you’ll see an Edit box at the lower right corner; click that, and you can then click-and-edit any of the pin names as you would a filename in Finder.

    You can also delete favorites here by clicking the ‘x’ icon.

  6. Click Done, and your custom name should be saved with the dropped pin.

Apparently in iOS, you’re prompted for a name when you tap the Favorite icon—that makes a lot sense, and macOS should follow the same convention. But it doesn’t, sigh.

Show albums a given Photos’ photo has been added to

A friend asked if there was a way in Photos to see which albums a selected photo had been added to. This is one of those things that would be incredibly easy for Apple to provide: Select a photo, press Command-I, and in the info window, you could see a list of all albums containing the selected photo.

Unfortunately, Apple doesn’t seem to think people might care about what albums a photo is in, so this feature exists only in my mind. Thankfully, Mac users Jacques Rious and léonie wrote an AppleScript to solve the problem. I used the first instance (version 4) of the script in that post and it worked fine in High Sierra. (In case Apple ever decides to remove its forums, I’ve recreated the script below.)

To use the script, paste it all into AppleScript Editor and save it as an application (or you can just run it in AppleScript Editor). In Photos, create a top-level album (I named mine Find Albums Photo Is In), and place the photo you want to know about into that album. Leave it selected, then run the AppleScript. You’ll see one dialog stating what photo is being used, then after a bit, you should see a results dialog, like this:

As you can see, the album used for the search is included in the results; someone with better AppleScript skills than I could probably modify the script to exclude that album (any takers?). While I’d much prefer Apple include this feature directly in Photos, at least there’s an alternative when you need this information.

(more…)

How to download macOS Sierra

This morning on Twitter, Antonio asked…

I thought “Well, that’s an easy question to answer—via the Mac App Store, of course.” As it turns out, that’s the right answer, but it was much harder to find than I expected it to be. I started on the Purchased tab in the Mac App Store app, where you can (theoretically) see all past purchases, including prior Mac OS X versions. However, those old releases stop with Mac OS X El Capitan from 2015; neither Sierra nor High Sierra are listed.

Next I tried searching the Mac App Store for Sierra, but that nets only Server and High Sierra, and a few apps that appear to have gotten away with using “Sierra” in their descriptions:

I then tried the Apple Developer site, but they don’t offer Sierra for download either.

Somewhat stumped, I then started searching, and after way too many attempts, I finally landed on this useful page at Stack Exchange, which attempts to explain how to download all older versions of Mac OS X/macOS. Here’s the relevant bit for Sierra:

For OS versions since Sierra.

Sierra itself has now vanished from everybody’s Purchase History. However, Apple are keeping Sierra fully available, even though High Sierra is out. No Apple ID is required.

Apple KB – How to download macOS Sierra
Sierra – Direct download link from the App Store

Given how much trouble I had finding this page, I thought I’d post it here for anyone looking for Sierra. Going forward, keep that Stack Exchange link handy, as it should be updated in the future as new releases come out.

Easily delete albums in Photos

Last fall, I finally made the move from iPhoto to Photos…months later, I still find myself frustrated by many things in the Photos’ user interface.

Today’s aggravation dealt with cleaning up a bunch of older photo albums—some I just wanted to delete, others I wanted to convert from Smart Albums into normal albums (because I wouldn’t be adding any more photos that used the keywords in the Smart Album). That meant I wanted to delete a bunch of albums—well over 100.

Deleting an album in Photos can only be done from either the My Albums overview, where you can select more than one (though not across folders), or via the contextual menu in the sidebar.

The My Albums view wasn’t going to work for me, as I needed to look at and work with many of the albums, across many folders. But after the sixth time of doing the “right click, select Delete Album, tab to Delete in the confirmation dialog, press Return” dance, I was sick of it. Time for another Keyboard Maestro macro.

This one is very simple—it just replicates the actions required to delete an album. With it in place, I click on the album I wish to delete, then press Control-D. It’s still more mouse interaction than I’d prefer—why can’t I select albums via the keyboard?—but it’s oh so much faster than using the contextual menu.

(more…)

The iMac Pro—and upcoming Mac Pro—are Apple’s ‘halo cars’

Writing on his blog, Kirk McElhearn talks about profit and the iMac Pro/new Mac Pro (emphasis added):

I’m speculating, but I think Apple won’t be making much of a profit from the iMac Pro, or the coming Mac Pro, but rather needs to have these computers as flagship devices to show that the company can innovate. If they take a loss, because of R&D costs, it’s not a big deal, because for every iMac Pro or Mac Pro they’ll sell, they probably book 10,000 iPhones.

I think Kirk’s spot on here (though this being Apple, I wouldn’t be surprised if they make a small profit on the Pro models). And there’s a perfect corollary in the automotive world: halo cars

A halo vehicle (or halo model) in automobile marketing is one designed and marketed to showcase the talents and resources of the manufacturers and to promote sales of other vehicles within a marque.

Consider Ford and the new Ford GT, which is a stunning $495,000 sports car…

Ford won’t sell may of these—I believe they’ve capped production at 1,000 units or so, and they’re probably taking a loss on each car. But it’s a car that shows what Ford can do given unlimited budget and working outside the constraints of a typical production line—it takes one full day to assemble each car. Compare that to the roughly 300,000 Ford Fusions sold each year, which means they’re producing over 820 cars per day.

It also gives the owner of a Fusion or Fiesta or Mustang the ability to say “Yea, it’s a Ford—the same company that makes that amazing GT.” It may even draw them into a showroom to see the car, where they may leave with some lesser vehicle. (Though with so few GTs being built, Chevrolet’s Corvette is a better real-world example of a halo car, as you can find those at any Chevy dealer.)

Thinking about the iMac Pro/new Mac Pro as Apple’s halo cars makes perfect sense. These are expensive machines that will sell to relatively few people, but every Mac (and iPhone) owner can say “Yea, the same company that makes those amazing high-end desktop machines.” It may also draw users to an Apple Store to see this amazing metal, and they may end up leaving with a “normal” iMac or MacBook Pro.

And it lets Phil keep saying “Can’t innovate any more, my ass!” for a few more years.

Revisiting a PDF page counting script

A couple of years back, I created a bash script to count PDF pages across subfolders. Here’s how it looks when run on my folder of Apple manuals:

I use this script on the top-level folder where I save all my Fujitsu ScanSnap iX500 scans. Why? Partly because I’m a geek, and partly because it helps me identify folders I might not need to keep on their own—if there are only a few pages in a folder, I’ll generally try to consolidate its contents into another lightly-used folder.

The script I originally wrote worked fine, and still works fine—sort of. When I originally wrote about it, I said…

I feared this would be incredibly slow, but it only took about 40 seconds to traverse a folder structure with about a gigabyte of PDFs in about 1,500 files spread across 160 subfolders, and totalling 5,306 PDF pages.

That was then, this is now: With 12,173 pages of PDFs spread across 4,475 files in 295 folders, the script takes over two minutes to run—155 seconds, to be precise. That’s not anywhere near acceptable, so I set out to see if I could improve my script’s performance.

In the end, I succeeded—though it was more of a “we succeeded” thing, as my friend James (who uses a very similar scan-and-file setup) and I went back-and-forth with changes over a couple days. The new script takes just over 10 seconds to count pages in the same set of files. (It’s even more impressive if the files aren’t so spread out—my eBooks/Manuals folder has over 12,000 pages, too, but in just 139 files in 43 folders…the script runs in just over a second.)

Where’d the speed boost come from? One simple change that seems obvious in hindsight, but I was amazed actually worked…

(more…)

macOS quality as measured by update release rate

There’s a lot of chatter out there that High Sierra is potentially the worst macOS release ever, in terms of bugs and broken or missing functionality. From the recent Month 13 is out of bounds log spewage problem to the root no password required issue (whoops!) to a variety of other glitches, High Sierra has presented many users, myself included, with a near-constant stream of issues.

But is it actually any worse than prior macOS/OS X1I’ll just call it macOS from here on. releases? There’s really not a lot of information to go on, given Apple’s very-private development process and non-public bug tracker.

However, the one data source I do have is a list of every macOS release date. With 10.13.2 having just been released, I thought it might be interesting to see how quickly the third update arrived on each version of macOS. If High Sierra is worse than usual, I’d expect that the time required to reach its third update would be notably less than that of other releases.

After some fiddling in Excel, the data proved—with some caveats and observations—my hypothesis…

(more…)

The Calculator bug persists in iOS 11.2

It’s not as bad as it was before, but it’s definitely still there. You don’t even have to tap super fast; I can make it happen whether I’m using two fingers or one. As long as a couple of button taps are within a reasonably-quick amount of time, you’ll get the wrong answer.

Dec 14 Update: I’ve now visited an Apple Store, and can replicate the bug in iOS 11.2.1 on the X, 8/Plus, and 7/Plus. See below for a video of the iPhone X running iOS 11.2.1.
Dec 3 Update: Some users with the same phone models as those I’ve tested say they can’t replicate the bug. I’ve added a video of my phone in use, showing exactly how quickly I was tapping, and that the bug is definitely there. Click the “more…” bit to see the video.
Dec 2 Update: Users have reported the bug is fixed on the iPhone 7 Plus and the X. But it’s definitely present on the following phones: iPhone 6, iPhone 6S, and iPhone 8 Plus—I personally tested all three of those. If you have a different model and can test, please do so and let me know—I’ll update the list when I receive responses.

Below are three examples; one with 3+2+1 and two with 6-5-4. The slow-motion version shows exactly how Calculator comes up with the wrong answer, as you can see incorrect values being inserted. This was recorded on my just-upgraded iPhone 8 Plus running iOS 11.2:

I can even make this happen with a simple “3+2” test. You may argue that I’m tapping the keys too quickly, but I’m not really hitting them at super-human speed, just quickly. And more importantly, the taps should be recognized and cached in order, regardless of what onscreen animations are occurring.

Trying the same experiment with PCalc, for example, I cannot make it fail, even tapping buttons much more quickly than I do in Calculator.

Kill the fancy animations, Apple, and just make Calculator remember our key taps, please?

(more…)

The Robservatory © 2018 • Privacy Policy Built from the Frontier theme