Archive for July 21, 2017

Friday, July 21, 2017 [Tweets] [Favorites]

Customizing the File Header Comment and Other Text Macros in Xcode 9

Ole Begemann (tweet):

Xcode 9 allows you to customize the file header and other so-called text macros using a plist file. The process is described in Xcode Help on a page titled Customize text macros.

[…]

See Text macros reference below for a full list of available macros. You can use other text macros in your value by wrapping them with three underscores, such as ___DATE___. See Text macro format reference below.

Previously, you had to edit various template files or use defaults write.

Some Known Bugs in macOS 10.12.6

Howard Oakley has a list of user-facing bugs that remain in what is likely the last update to Sierra. Here are some that continue to affect me regularly:

Rclone

Rclone (via Felix Schwarz):

Rclone is a command line program to sync files and directories to and from:

  • Google Drive
  • Amazon S3
  • Openstack Swift / Rackspace cloud files / Memset Memstore
  • Dropbox
  • Google Cloud Storage
  • Amazon Drive
  • Microsoft OneDrive
  • Hubic
  • Backblaze B2
  • Yandex Disk
  • SFTP
  • The local filesystem

There’s also an interesting overview of the features of the different cloud storage systems.

When to Force Quit iOS Apps

John Gruber:

The single biggest misconception about iOS is that it’s good digital hygiene to force quit apps that you aren’t using. The idea is that apps in the background are locking up unnecessary RAM and consuming unnecessary CPU cycles, thus hurting performance and wasting battery life.

That’s not how iOS works. The iOS system is designed so that none of the above justifications for force quitting are true. Apps in the background are effectively “frozen”, severely limiting what they can do in the background and freeing up the RAM they were using. iOS is really, really good at this. It is so good at this that unfreezing a frozen app takes up way less CPU (and energy) than relaunching an app that had been force quit. Not only does force quitting your apps not help, it actually hurts. Your battery life will be worse and it will take much longer to switch apps if you force quit apps in the background.

I agree that force quitting is usually unnecessary and can actually hurt battery life. However, I think the “myth” persists because there are some cases where it really does help. (In the same way, in theory a Mac should keep working without rebooting, but in practice you sometimes have to restart to free up memory, get the OS to recognize something that you’ve plugged in, or fix a system service that has stopped working.) Unfortunately, people assume that if force quitting occasionally fixes a problem, doing it regularly is even better.

Bryan Irace (via Brian Donohue):

All of the new multitasking support—normally working its wonders to keep apps updated in the background without draining your battery—comes to a screeching halt for any apps that you’ve swiped out of the app switcher.

Removing an app from that switcher not only terminates any background operations that are currently occurring, but also prevents any that the OS may have permitted in the future. This means that the app won’t be woken up again to perform background fetches, and won’t receive anymore silent push notifications from the server. In order for these new forms of backgrounding to resume, you’ll have to explicitly launch the application again from your home screen.

In summary, iOS 7 makes true what many thought was already the case to begin with: that force quitting apps can help to save scarce resources such as battery.

Force quitting can also stop unwanted cellular and GPS use and works around a Spotlight bug.

So don’t try to save battery life by force quitting all the apps you aren’t using. But if an app is misbehaving or you specifically want to cut it off from using certain resources in the background, by all means do so.

Gruber again:

In those cases force-quitting the apps really did help, and I see no reason to trust Facebook. So if you want to keep force quitting Facebook, go right ahead. But don’t let one bad app spoil the whole barrel. The Battery section in the iOS Settings app can show you which apps are actually consuming energy in the background — tap the clock icon under “Battery Usage” and don’t force quit any app that isn’t a genuine culprit.

Previously: The Force Quit Fallacy, Background Data and Battery Usage of Facebook’s iOS App.

Update (2017-07-21): Edward Marczak:

This is a hopeless battle. When I see (non tech) people do this, and ask why, they say they like to “clean up”. Nothing to do with battery.

You can explain it all day, however you like. it’s an “emotional” issue for most. They don’t want to see all of that crap in the switcher.

Update (2017-07-27): Matt Massicotte (tweet):

I’m going to take a pretty unpopular stance on force quitting apps. But before I get to that, I have to say that I worked at Apple on iOS battery life for a number of years. Of course, I’m not going to use any insider info here — it’s all stale anyways. What I am going to try do is make the case that:

  • Force-Quitting is a rational thing to do
  • Force-Quitting is a behavior enabled by Apple
  • Force-Quitting isn’t something you should care about

[…]

It takes a long time to build trust, and only one transgression to destroy it. It doesn’t matter that iOS is excellent at managing background apps. It only matters that a backgrounded app could cause a problem. In fact, this possibility is real enough that Apple highlights “Background Activity” in the battery usage screen.

[…]

The task switcher is made by Apple. The backgrounding APIs and policies are made by Apple. Apps are inspected by Apple before being put in the store. This is completely Apple’s responsibility and within their power to improve. They have just chosen to present this simplified view. In turn, some users feel compelled to turn the only knob that Apple has provided.

I Got Hacked and All I Got Was This New SIM Card

Justin Williams:

I like to think I take an above average amount of steps to secure myself online: I use a password manager, unique passwords as complex as the site will allow, and turn on 2-factor authentication when possible. A true security expert will likely find some sort of flaw in my setup, but I’ll argue that I am doing more than 95% of the planet.

So how did I, someone who is reasonably secure, have his cell phone disabled, his PayPal account compromised, and a few hundred dollars withdrawn from his bank account?

[…]

The man on the phone reads through the notes and explains that yes, someone has been dialing the AT&T call center all day trying to get into my phone but was repeatedly rejected because they didn’t know my passcode, until someone broke protocol and didn’t require the passcode.

[…]

You’re likely wondering how my cell phone being compromised leads to my PayPal account being compromised? All you need to reset a PayPal password is an email address and a phone number to accept the verification code. Since PayPal only supports SMS-based authentication, all the perpetrator needed was to be able to receive SMS messages as “me” and he was in.