Archive for October 14, 2020

Wednesday, October 14, 2020

Faster Xcode Updates

Igor Kulman (via Cédric Luthi):

Installing Xcode from the Mac App Store might seem like a convenient way to do so but it is too slow and inflexible. You cannot use the Mac App Store to install multiple version of Xcode at the same time if you need them, like when testing with a Xcode beta for an upcoming iOS release. Download from the Mac App Store is incredibly slow and sometimes not even available for days after release (like 11.2.1).


Downloading Xcode from the Apple Developer Portal is faster than using the Mac App Store, but it can be made even better. You just need to use the right tools.


This script downloads the given Xcode by URL from the Apple Developer Portal, but uses up to 16 separate connections to do so. You will see a significant download speed improvement.

Paul Hudson:

Pro tip: if you downloaded Xcode straight from Apple, you can use xip -x Xcode_12.1_GM_seed.xip to skip the validation step and save approximately a billion tons of CO².

And don’t forget to turn off Dropbox.


Update (2022-01-17): Saagar Jha:

Tip: when expanding an Xcode XIP archive, use the command line (xip --expand) rather than Archive Utility. It’s at least 25% faster–sometimes even twice as fast, depending on the circumstances. They both call into the Bom API, so I profiled both to see why there’s a difference.


Anyways, the decompression process for a XIP is fairly straightforward: read files out from the XIP’s LZMA stream, recompress them with LZFSE if possible, then write them to disk. The compression is handled by AppleFSCompression, and it’s more than happy to parallelize the task.


Specifically, it’s the creation of those half a million files that really hurts overall performance. The “driver” thread is unable to create files fast enough to keep the worker thread pool busy doing actual work on the CPU, because it’s blocked by file operations in the kernel.


How expensive is this evaluation? Pretty expensive, it turns out. Filesystem operations might spend up to 30% of their time on CPU just evaluating sandbox policies! And all of these run synchronously on that one thread, so they block everything else from proceeding.


Secondly, I found that xip consistently spent less time in Sandbox evaluation. I can’t be sure why, but my guess is that it has a simpler profile (it’s basically unsandboxed…) so the policy might be simpler to check. All other things being equal, it’s still 25% faster overall.

Update (2022-02-04): Ken Kocienda:

I don’t think I have ever successfully downloaded Xcode from the Mac App Store. Just failed again. Simple, convenient, but doesn’t work.

BBEdit 13.5

Bare Bones Software:

BBEdit has a new feature to protect your data: in the Text Files preferences, there is an option: “Rescue untitled documents when discarding changes”. When this option is on (as it is by default), and you close an untitled document (one that has never been saved to disk), and click “Don’t Save”, BBEdit will save a snapshot of that document’s contents to disk.


Added a command to the Palettes submenu: “Markdown Cheat Sheet”. This opens a floating window showing common Markdown constructions. Double-clicking on an item will insert it into the active document; you can also drag an item to insert it where desired.


When running on macOS 10.15 and later, there’s an additional command on the Window menu: “Move to [Display]”, where “[Display]” is the name of an eligible attached display.

I wish macOS in general had better ways of moving windows between displays and spaces. Why can’t I pick up a window, press the Mission Control hotkey, and then choose where to drop it? Instead, you have to go into Mission Control first, find the window that it just moved out from under you, and then wait for the hover animation before you can even see the other spaces.

Update (2020-10-14): It looks like macOS can do what I suggested, but only if “Displays have separate Spaces” is unchecked. Alas, I really prefer my displays to be linked on the same space.


MagSafe 2020

Mitchel Broussard:

Apple today announced that the iPhone 12 family is gaining support for MagSafe, which will offer high-powered wireless charging as well as a new ecosystem of accessories that attach to the iPhone 12. Previously, MagSafe was Apple’s brand for the MacBook’s breakaway charging cables.

The company said that MagSafe will improve the charging experience on iPhone 12, with magnets that are optimized for alignment and efficiency, and support 15W of charging.

Alex Guyot:

Apple’s MagSafe accessory lineup starts with the MagSafe charger, a 15-watt Qi-compatible charging puck that magnetically attaches to the back of an iPhone 12 (all iPhone 12 models from the Mini to the Pro Max include MagSafe). There are also a series of new MagSafe cases which magnetically attach in the same way. These cases come in a variety of silicone colors, or in a clear design with a MagSafe circle. The magnetic connection allows the cases to be easily put on and pulled off, while staying attached during use. The case edges no longer have to bend around the front of the iPhone’s display because MagSafe is holding them in place.


Update (2020-10-15): Robert Howard:

The new iPhone MagSafe really isn’t. The whole point of MagSafe on MacBook Pro was that it would easily breakaway and keep your laptop from crashing to the floor. But the new Mag”Safe” is strong enough to hold on a case, become a dashboard mount, etc. More like MagLock…

I think it’s going to be great, though.

Update (2020-10-19): Juli Clover:

We don’t have an iPhone 12 model on hand yet to see the actual difference between the magnetic connection of one of the new models and an existing iPhone , but just based on the marketing materials Apple has released, that magnetic ring in the iPhone is an important factor when it comes to the strength of the connection.

Even using a MagSafe-compatible iPhone 12 case from OtterBox results in a connection that’s not super strong, and it appears that OtterBox, at least, has just stuck a couple of magnets in a little insert in the case to add MagSafe functionality.

Update (2020-10-20): Jeremy Horwitz:

A size comparison of MagSafe for iPhone and the Magnetic Charging Cable for Apple Watch. To answer a common question: MagSafe is a very large puck, but does not have the weight to remain on a flat surface when you lift up the iPhone. It will need to be held down somehow.

Update (2020-10-22): Dieter Bohn:

And now, some unsolicited and frankly random and incomplete thoughts about MagSafe on the iPhone 12 now that I’ve used it.

Update (2020-10-23): Hartley Charlton:

Although Stern found that the MagSafe charger charged the iPhone 12 faster than a traditional 7.5W Qi wireless charger, it was still slower than plugging directly into a 20W charger. The 20W charger charged an empty iPhone to 50% in only 28 minutes, while the MagSafe took 1 hour.

Update (2020-11-07): Dave Mark:

If you bought or are considering a MagSafe charger, read the support article linked below.

One bit:

“Don’t place credit cards, security badges, passports, or key fobs between your iPhone and MagSafe Charger, because this might damage [the mag strips]”

Joe Rossignol:

If you keep your iPhone in a leather case while charging with Apple’s new MagSafe Charger, the case might show circular imprints from contact with the accessory, according to a new Apple support document published today.


My 12 Pro is taking a charge on my Qi chargers but I’m seeing really distracting scanlines whenever it is charging. I feel like I’m looking at my CRT monitor from 2001. My XR and XS max don’t have this problem. I’d bet that the magnets are interfering. Super genius idea to put magnets between electromagnetic coils.

John Gruber:

Matt Birchler captures the incongruity of Apple’s pitch that they don’t need to include chargers in the iPhone box anymore because everyone has so many chargers already, but their new MagSafe charging only works at full capability with the new 20W adapter that no one already has.

Update (2020-11-10): Josh Centers:

Many people feel that the most interesting new technology in the iPhone 12 is the new MagSafe charging and accessory attachment system, but early experiences are revealing some annoying gotchas.

iOS 14 and 14.1

Federico Viticci:

Second, context is necessary because despite the pandemic and rocky rollout of iOS 13 and its many updates, Apple was still able to infuse iOS and iPadOS 14 with fresh, bold ideas that are tracing a path for both platforms to follow over the next few years.

On the surface, iOS 14 will be widely regarded as the update that brought a redesigned Home Screen and a plethora of useful quality-of-life additions to the iPhone. For the first time since the iPhone’s inception, Apple is moving past the grid of icons and letting users freely place data-rich, customizable widgets on the Home Screen – a major course correction that has opened the floodgates for new categories of utilities on the App Store. In addition to the upgraded Home Screen, iOS 14 also offers welcome improvements to long-standing limitations: phone calls can now come in as unobtrusive banners; Messages borrows some of WhatsApp’s best features and now lets you reply to specific messages as well as mention users; Siri doesn’t take over the entire screen anymore. There are hundreds of smaller additions to the system and built-in apps in iOS 14, which suggests Apple spent a long time trying to understand what wasn’t working and what customers were requesting.


We can see the results of this initiative in modernized system apps that take advantage of the iPad’s display with a sidebar, multiple columns, and deeper trackpad integration – new options that every iPad app developer could (and, according to Apple, should) consider going forward. Although some of the iPad’s oft-mentioned ongoing struggles remain unaddressed in iPadOS 14 (see: multitasking and window management), Apple is embracing the iPad’s nature as a modular computer this year, and they feel comfortable leaning into lessons learned with the Mac decades ago.

John Voorhees:

Among the Club-only extras this year are three eBooks, a set of stunning, widget-friendly iPhone wallpapers, advanced shortcuts, podcast episodes, and a special edition of MacStories Weekly.

Juli Clover:

Following the introduction of the iPhone 12 mini, iPhone 12, iPhone 12 Pro, and iPhone 12 Pro Max, Apple has released iOS and iPadOS 14.1 golden master betas for developers, with the iOS 14.1 update presumably coming pre-installed on the new iPhones at launch.


There’s no word yet on what’s included in these updates[…]