MacID for OS X reconnection procedure

As MacID becomes more popular, more and more people in offices are using it.

This is awesome, but in an environment like this it really shows up an issue where MacID has to “ping” everything nearby to reconnect to your device.

I really wish I didn’t have to do this, but there are a couple of issues with Bluetooth on OS X that mean I have to.

  1. The APIs are meant to allow apps to search only for devices that have a specific service. Unfortunately this just doesn’t work, I’ve spoken to other devs and they’ve had the same issue.
  2. Apps are also meant to be able to save a device’s identifier to reconnect to it at a later date. This works, until iOS changes its identifier, which happens randomly. I suspect this is something to do with protecting users’ privacy, but it makes reconnecting difficult.

As you can imagine, both of these issues present a problem. The only solution to which is to scan for everything and then try and figure out which is the right device.

Every new version of OS X I check if this has been fixed so I can at least search for just devices that are advertising the right services but unfortunately that hasn’t happened yet.

High cfprefsd CPU usage when using MacID

Update 5: Apple have replied to my bug report informing me that it’s a duplicate of another bug (#24570370). When that bug gets marked as fixed I will be able to see it and update you accordingly, but until it does we’ve done all we can do at this point.

Update 4: Thank you to everyone who’s provided a Bluetooth diagnostic report, I’ve now forwarded them on to Apple with bug report #26194733. 

Update 3: Clearing the OS X Bluetooth cache should help, even if not permanently. To clear the cache, click the MacID menu > More > Reset Bluetooth. It shouldn’t affect any paired keyboards or mice but will clear the cache.

Update 2: Other apps that use Bluetooth APIs on OS X are experiencing the same issue. Hopefully Apple will have a fix for this in the near future. Other people have been filing bugs with Apple too.

Update 1: A user has been kind enough to email to let me know that after reinstalling El Capitan, it has fixed the issue for them. Not an ideal solution by any means, but does help prove the theory Apple can fix it.

There are a few people reporting that while using MacID, the system is reporting high CPU usage for the `cfprefsd` process. I’ve never been able to reproduce this issue so it’s been hard for me to diagnose, but thanks to some helpful people I’ve been told it seems to happen when MacID is searching for your device to connect to.

Unfortunately this means that this is an issue internally where the system is accessing the Bluetooth plist file, and there’s not much I can do about that. If I stop MacID from scanning, then of course MacID would never connect to your device and it would be useless.

Thankfully this doesn’t happen to everyone, but if you are affected the more information you can provide about when it happens will help me narrow the issue down and file a decent bug report with Apple. What would be even more helpful is if you can send me a Bluetooth diagnostics report, along with your model of Mac and the version of OS X you’re using.

Here’s how to start a Bluetooth diagnostics report:

  • When the issue has happened, hold alt/option and click the Bluetooth icon in the menu bar
  • From the menu that appears choose “Create Diagnostics Report on the Desktop…”
  • After a moment a zip file will appear on your desktop, forward that file to the feedback email address and I’ll add it to the bug report with Apple

Any help you can provide will go a long way to getting this issue fixed. I can’t file a bug report with Apple until I can either reproduce the issue or forward on a report from someone who has. Thanks!

MacID v1.3.2

Hello! Along with the announcement of MacID for Pebble, I’m pleased to announce MacID v.1.3.2 has just passed review with Apple.

There’s a lot of changes in v1.3.2, I’ve worked long and hard to improve on some stuff you can see and stuff you can’t see. I’ve completely re-worked MacID’s innards, which has not only significantly reduced crashes but also paved the way to make it much easier for me to add new features and fixes in the future.

If you want to be awesome, please review or update your review in the iOS App Store for MacID, unfortunately whenever a new version is released all the old reviews get pushed off the search results ?

Here’s a run down of what’s new in v1.3.2. It’s not a short list!

MacID for iOS

  • Adds support for MacID for Pebble. Visit macid.co/pebble to download MacID for Pebble for free.
  • Adds a pressure sensitive Settings button. Try it out if you have a 6S or 6S Plus!
  • Adds support for Background App Refresh.
  • When Touch ID is disabled in MacID for iOS, opening MacID from a lock screen notification will unlock your Mac straight away without requiring your fingerprint again.
  • If MacID for iOS is in the foreground on two devices when you wake a Mac connected to both, unlocking from one will make the Touch ID prompt automatically disappear on the other (iOS 9 only).
  • If Low Power Mode is enabled, MacID will automatically throttle Bluetooth connections to save power. This will result in slower reaction times but decreased power usage.
  • Adds support for snoozing Proximity Wake for different durations (30 minutes, 1 hour, 6 hours or 1 day).
  • Adds support for only showing “snooze” in the interactive notification when the Mac wakes from Proximity Wake.
  • Minor changes to the Widget to make it fit in better with the Notification Center theme.
  • MacID for iOS now uses the same fancy full-screen diagonal gradients like MacID for OS X.
  • New animation when changing the colour scheme. (also works on MacID for OS X if you have a window open!)
  • Adds an option to completely hide the Widget if no Macs are connected.
  • Adds new options to customise which sounds play for which notifications.
  • Adds option to “unlock all” or “lock all” from home screen 3D Touch shortcuts.
  • Removes some background tasks if no Apple Watch is paired to improve battery usage.
  • Fixes an issue where the Settings “ripple” effect wouldn’t work properly when choosing “Create shortcuts” from a long-touch menu.
  • Removes “swipe to activate buttons” on connected devices to stop accidental disconnections/removals.
  • Clears up unnecessary logging.
  • Fixes the Widget showing the wrong name on German devices.
  • Fixes many background crashes.
  • Fixes an issue where the currently playing song wouldn’t show if a Mac disconnects and reconnects.
  • Significantly improved data send queue system to make it more reliable.
  • URL schemes can now use “macid://” instead of “macid:///”, previously set up URL schemes will continue to work.
  • Fixes an issue where launching the app from a notification wouldn’t ask for authentication if interactive notifications are disabled in settings.
  • Fixes the “welcome” window not being shown for new users.
  • Fixes an issue where the user account image wouldn’t automatically be sent when connecting a new Mac.

MacID for Apple Watch

  • Adds support for snoozing Proximity Wake.
  • Adds support for showing when your iOS battery is charging, low or using Low Power Mode in the MacID Glance.
  • The MacID for Apple Watch Glance is back! And with a fresh new look.
  • Fixes an issue where “Unlock all” wouldn’t honour if unlocking from MacID for Apple Watch is disabled in settings.

MacID for OS X

  • Adds the ability to set keyboard shortcuts for locking and sending clipboard.
  • MacID can now even display the currently playing song if MacID for OS X is launched mid-song.
  • Adds German localization.
  • Updates Sparkle to use the latest version.
  • Completely re-written data send logic to improve communication between devices and prevent crashes.
  • Completely re-written window management to make it quicker for me to add new features in the future.
  • Adds support for using the colour scheme chosen in your primary iOS device. Changing the colour on iOS animates the colour change in any MacID for OS X windows open. Really swish!
  • MacID windows now use the lovely diagonal gradient, just like MacID for iOS the MacID website.
  • Adds support for getting more reliable device name information (rather than it sometimes just showing “iPhone”)
  • Stops the Dock icon briefly appearing and disappearing on app launch.
  • Prevents an issue where the MacID menu items would be greyed out on app launch.
  • Adds support for only showing the snooze button on iOS notifications when the notification is sent due to Proximity Wake.
  • Prevents the auto-lock warning notification not dismissing even if you use the keyboard or mouse.
  • If the password is missing from the keychain, MacID will display the “Save Password” window on launch.
  • Adds the ability to relaunch MacID from the More menu. Useful for quickly fixing Bluetooth connection issues.
  • The Lock Screen menu item now has a nicer, tidier looking icon.
  • RSSI information now shows above the primary iOS device to make it clearer which device MacID is getting the information from.
  • Device menus now show more reliable states, and the primary iOS device now states that it’s primary.
  • Adds the ability to add more than two devices if you so wish, however two is still recommended due to OS X not handling multiple connections particularly well.
  • New progress indicator when sending/receiving large amounts of clipboard text.
  • Fixes a glitchy looking activity indicator window.
  • Windows are now “floating” windows. This means that if you accidentally click away from a MacID window you won’t have to bring up Mission Control to get back to it.
  • If you’re using a Dock icon instead of the Menu Bar icon, the Dock icon will show a “!” if there’s an issue like Bluetooth being turned off or unavailable.
  • MacID now determines that a user is active if the keyboard or mouse has been used in the last 3 seconds, previously it was 5. Doesn’t sound like much, but some people can get away from their Mac sooner than 5 seconds and auto-lock won’t trigger.
  • Brings back the “auto-move” option if MacID is launched anywhere other than the Applications folder. Useful for people who don’t use automatic updates and prefer to use the website.
  • If you have automatic updates disabled, choosing “check for update” will now take you to the website’s update page (like before automatic updates were implemented).
  • MacID lock-screen UI now displays properly if the screen is locked when dismissing a screensaver.
  • MacID also now properly hides it’s lock screen UI if you press escape on the screensaver’s lock screen. Previously it would get stuck on the screen.
  • Adds the ability to change your Tap to Unlock tap pattern without having to first disable Tap to Unlock.
  • Auto-lock menu now shows is an app or process is stopping the screen from sleeping (which disables auto-lock). Unfortunately the Caffeine app uses some way of keeping the screen awake that MacID can’t detect.
  • Fixes an issue where “taps” would get stuck on the screen.
  • Snoozing Proximity Wake from the iOS app will press the escape key so the screen shuts off straight away.
  • Prevents an issue where snooze time remaining could show a long negative number.
  • Proximity Wake now imposes a 5 second delay after screen sleep to stop it triggering as people are walking away.

Phew. Not bad for a x.x.2 update eh? ? The next major release of MacID will be v2, which I’ve already started work on! There are a few apps similar to MacID on the App Store, but few receive as many updates and as much time as MacID does. I use it every day, and because of that I get to see what’s good and what needs changing.

Thanks to everyone who’s supported MacID!

Getting MacID Set Up

Setup with MacID has always bee simple. I’ve tried to make sure there are as few steps as possible.

When Bluetooth is working great, setup can be achieved in as little as 10 seconds, but all too often Bluetooth on OS X has some sort of issue. (This is also why Handoff and AirDrop are sometimes flaky.)

I’ll run through the setup procedure first, and then some common fixes for issues while setting up. Continue reading Getting MacID Set Up

Debugging Auto-lock

Auto-lock has always been a feature that works fantastically well for some people, and not so great for others. The main reason for this is signal quality, but it can easily seem like auto-lock doesn’t work.

I’d really recommend reading through Understanding MacID’s Proximity Features, if you haven’t already. That post goes into much more detail about how exactly Auto-lock and Proximity Wake work. Continue reading Debugging Auto-lock

Resetting Bluetooth on OS X

Unfortunately, Bluetooth on OS X isn’t perfect. In fact, I’ve had to include a lot of workarounds in MacID’s code to try and get Bluetooth to a more reliable state. Thankfully, Bluetooth on iOS is pretty stable.

If you’re experiencing issues with Bluetooth on OS X there are a few ways you can try resetting Bluetooth. Continue reading Resetting Bluetooth on OS X