Hey Siri, when is the next bus home?

I just put the finishing touches on my bus shortcuts on my iPhone.  It always bugged me that I couldn’t ask Siri “When’s the next bus to work?” or “When’s the next bus home?”.  NJ Transit has a web interface called My Bus Now and I always have it up on a first gen iPad in the bathroom in the morning, but frequently, as I’m rushing around to make it to the bus, I want to do a quick time check to see how far away the bus is.  My hands aren’t always free or I don’t want to stop running around, unlock the phone, navigate my home screen, tap my homescreen shortcut, put my glasses on, wait for the page to load, and look at the screen to make sure it’s the right bus route (which I frequently miss and sit there at the stop kicking myself for not noticing the next bus was for a different route number).  It’s much faster, accurate, and more efficient to just say “He Siri, when’s the next bus to work?”, with all those details taken care of for me.  With Siri Shortcuts in iOS 12, this is now possible.

Continue reading


Temporary fix for an iPhone that cannot access .local addresses

And here’s the answer:

  • Turn airplane mode on, then off

The fastest way to do this is to swipe up from the bottom of the screen to access the control center, then tap the airplane icon:


Wait for the other icons to darken, as the phone turns off wifi, bluetooth, and cellular signals, then tap the airplane to turn those back on again.  After doing this, you should be able to load anything on your local network using its .local address (as long as it’s configured correctly on the remote device).

This is a temporary solution.  Access to .local addresses will stop again at some point and you will have to repeat this work-around to regain access.

Here’s the cause and why this solution works:

At some point, an iOS update seems to have caused this issue.  The problem is Apple’s usage of .local addresses for its bonjour services (which allows devices to advertise their services, such as printing an airplay).  Bonjour does not play nicely with other services which use .local.  Bonjour is somehow interrupting the DNS resolution of these addresses.  It intercepts the communication of for example, your browser and the device providing the service and the presenting symptom (at least in my case) is a browser timeout.  The browser claims that the website simply stopped responding.  Each device has its own strategy to try and resolve domain names.  On a mac, that can be configured using the /etc/hosts file, but on an iPhone, the user doesn’t have a way of editing that equivalent setting.  What’s more is, the iPhone caches these shortcuts, and it’s that cache that is the problem.  Turning on airplane mode flushes that cache and allows your services you’ve manually set up on your network’s devices to get through.  However at some point, bonjour is going to come along and cause that cache to be reinitialized and cause the issue to recur.  This is why this is not a permanent solution.

What is a .local address?

Dot local addresses are memorable shortcuts to access other devices on your local network. It’s like your own personal dot com. All major OS’s support them: macOS, Windows, Linux, even RaspberryPi. You can use it for screen sharing, file access, web pages, ssh, etc..  If you’re running a web server on a computer in your home, you can access it from a web browser on another device by going to it’s .local address in a web browser, e.g. mymac.local.

I use my .local domains from my iPhone to do a number of things when I’m at home on my local network: screen sharing via the VNC app, ssh via the Terminus app, watching live TV via the iPhone’s Safari browser that accesses my EyeTV media server, and some websites I created for fun.  I usually add bookmarks to local web URLs to my home screen for easy access.

How do I find/edit my computer’s .local domain name?

Each mac on your network has a .local address based on your computer’s name. You can find it in the Sharing pane of the System Preferences app. At the top of the pane, there’s a entry field for your computer’s name and underneath that is some descriptive text. You can enter any name you want, but not all characters on your keyboard are allowed to be used in a domain name. macOS thus removes some characters, such as apostrophes, and replaces other characters (such as spaces) with dashes.

I tried using the .local address after this fix, but it doesn’t work.

macOS doesn’t activate a .local address by default. You must share the service you want to use in the Sharing pane of the System Preferences app. The section under the computer name has a panel with checkboxes where you can turn on or off certain services.  As long as one is turned on, the .local address is active.  However, the only devices that can access it are ones that are on the same network.  If you’re trying to access it from an iPhone, for example, make sure that you are connected to the same WiFi network as the computer you’re trying to reach.  If all else fails, you can use the computer’s local IP address (assigned by DHCP).  You can find that address in the Network pane of the System Preferences app.  If that works, and you’ve tried turning airplane mode on & off on your iPhone, then the .local should work. If that doesn’t work, let me know in the comments.

Other things I tried.

I first encountered this issue when I was trying to access my EyeTV media server.  I have used this server for over a decade, but about 4 or 5 years ago, I moved and no longer was receiving a good broadcast TV signal.  I recently bought a new outdoor directional antenna however, and now had stuff to watch.  So I opened up the old bookmark I used to reliably use on my iPhone for years that used the .local address of the computer with the EyeTV media server.  It wouldn’t work!  I discovered that if I went to the computer’s DHCP address, it did work.  I could have just changed the bookmark, but it irks me when stuff that should work, doesn’t, so I called Apple.

Apple Support had me “Reset All Settings” because they could not explain why it didn’t work.  (I’ll be submitting a bug report after this post.)  It worked!  It was a heavy-handed solution and I spent a week returning my phone to its normal behavior.  Then the next day I tried to access the server, the problem was back!

Googling this was not much help.  There are many solutions out there that suggest things like turning your phone off/on, clearing your browser cache, turning sharing preferences off and back on, etc..  None of them worked.  Every once in awhile, I randomly noticed that the .local addresses started working, but shortly there-after would stop working again.  And I didn’t want to have to reset all settings every time this happened.  Finally, after reading about the /etc/hosts file and mDNSresponder, I started googling things like “reset iphone dns”, which lead me to a solution for another problem that involved cycling the airplane mode setting and to my delight, it worked.

I’ll probably use the DHCP-assigned IP address for bookmarks in the future, but I finally know enough about what’s going on to be satisfied.  I hate it when things don’t work.

How to Create an “Open file” Calendar Alert in a Recurring Event that Sticks

I recently wrote an Automator workflow that asks me if I want to check the arrival of the next bus and opens the local transit system’s bus stop arrival web page that shows the live time the next bus is expected to arrive at the stop I saved in the workflow.  I then created a recurring calendar event in the Calendar app that opens the Automator application I’d saved.  (I could have created a cron job, but I like the ability to easily adjust the alert time if I need to leave work early.)

The alert is a custom alert, which I selected to occur “at the event time” and “Open file…”, for which I selected my bus Automator app.  I quickly noticed that at some point in the week, the alerts on all my recurring events change to a default of a simple notification with a sound occurring the day before.  The first time I missed the bus, I discovered the problem and edited the event to fix it.  But it kept happening, and happening.

TL;DR: The procedure is at the bottom of this article. Continue reading

How to Upload a 4,000 Photo iCloud Photo Library into a 40,000 Photo macOS Photos Library to Free Up iCloud Drive Space

Today I discovered that I didn’t have enough iCloud storage space for a file I wanted to share.  In the past (apparently since sometime in 2015), I was able to find space here and there, but today, it appeared, I was out of options.  Actually, I don’t really use iCloud for much, storage-wise.  I upgraded my iCloud storage to the 50G plan, mainly just for backups for apps, email, and a few documents, but with all that extra space (coming from the free 5G plan), I had decided to turn on backups on my other iOS devices and… to turn on the iCloud Photo Library on my phone.  I didn’t really understand how it worked.  Apple always seems to be changing its photo synching services.  I had imagined it would be awfully nice if I didn’t have to physically connect my phone to my computer to upload my latest photos, because up until I activated the iCloud Photo Library, I would occasionally sync and select to remove photos from my phone after import.  So through some wishful thinking, my synching sessions got fewer and fewer and I noticed that it never seemed to free up much space.

Somewhere along the line, iPhoto gave way to the Photos app on macOS, and the “remove after import” checkbox went away and I figured they must have figured it out the way I’d previously imagined.  After each import, the photos would no longer be detected on the phone from the photos app, so I just hoped they were getting transferred.  I was confused that I still seemed to have photos on my phone – lots of them, but I still had space, so I just hoped everything was being magically handled.  Besides, I had other things to worry about, so I chose to ignore the problem and just hope that things were somehow magically and wirelessly getting to my computer.  I willfully put out of my mind and didn’t think about the fact that I had intentionally not turned on the iCloud Photo Library on my computer, because I knew I had 10 times as many photos there as I had on my phone.

Today however, I finally tallied the photos on iCloud, and it was over 20 gigs!  I tried synching my phone again.  I couldn’t tell where all the photos on my phone were being stored.  Why could I transfer some, and they would disappear, yet I had seemingly 3 years of photos on my phone.  Were the photos in the iCloud Photo Library also getting onto my computer?  It looked like some were in both places, but were they all?  I searched for a way to limit the space that photos would take up in iCloud.  I googled to find out whether I could safely delete photos from my phone(/iCloud?) and I got mixed messages.

The thing is, it’s not transparent where a particular photo is stored when I’m in the photos app and there’s no way to let my computer handle it the way it had in the past.  So I decided to recruit some help and called Apple.  I eventually got elevated to a Photos app expert (Jacob), and he explained things very well.  Here’s how I understood it:

  1. All the photos on my phone were being saved on iCloud, and only in iCloud.
  2. I had enabled “Optimize iPhone Storage” in the Photos Settings, which means that I only had compressed/smaller versions of the photos actually on my phone.  The full versions were in iCloud.
  3. When I synched my phone with my computer, I was only getting recent photos that hadn’t uploaded to iCloud yet.
  4. Those transferred photos weren’t removed from the phone, so they also ended up on iCloud (but anything that had uploaded to iCloud since the last time I synched, never made it onto my computer).
  5. The macOS Photos app does not synch the compressed/small versions of photos on my phone that were reduced after uploading to iCloud.

So I was faced with an issue.  Normally, one would just turn on the iCloud Photo Library on the computer and it would download all the high res photos, but doing that would be a 2-way synch and I had 10 times the amount of photos on my computer.  There wasn’t enough space in my iCloud drive to synch everything.  I could have bought more iCloud drive space, but I already have the photos on my laptop backed up on a NAS drive, so I’d prefer to just transfer the iCloud Photo Library to the computer.  So here’s how we did it…

  1. Quit the macOS Photos app.
  2. Start up the macOS Photos app while holding down the option key.
  3. Select to create a new photos library and name it something like “iCloud Photos”.
  4. Open System Preferences -> iCloud.
  5. Turn on Photos and click the options button.
  6. Turn on the iCloud Photo Library.
  7. In macOS Photos, click “Photos” at the top left.
  8. Scroll to the bottom and wait for the downloading message to change to “Updated Just Now”.
  9. Select all the photos and choose Export -> Export Unmodified Original…
  10. Save the photos in a new folder on the desktop.
  11. Quit macOS Photos.
  12. In System Preferences, turn off the iCloud Photo Library.
  13. Start up the macOS Photos app while holding down the option key.
  14. Select the original Photos Library.
  15. Select File -> Import…
  16. Select the folder you created on the desktop and click “Review for Import”.
  17. Wait for all the photos to be detected then select them and click “Import All New Items”.
  18. When the import is done, delete the folder you created on the desktop and the iCloud Photos Library that Photos created in your “Pictures” folder.
  19. [Proceed if you wish to remove the photos from iCloud, and thus your other devices…] Open System Preferences -> iCloud, then…
  20. Click the “manage” button at the bottom right.
  21. Click Photos, then click “Disable and Delete”

I never would have figured this out on my own and I imagine that many of you are just as bewildered as me, that is unless you started taking pictures after the iCloud Photos Library was created.

A couple things to note: 1. Photos you take in other apps (such as in the Messages app, whether they were taken and sent or received) are not in the iCloud Photos Library.  2. The macOS Photos app no longer detects duplicates, so importing photos that you previously synched (before they were uploaded to iCloud) may result in multiple duplicates.  There are apps available on the App Store for detecting and removing duplicates.

Work-around for Zombie Proximitask Reminders

I’ve posted about Proximitask before.  It’s no longer on the app store, despite it’s usefulness (especially when paired with RadBeacons which you can plug into any USB port).  I would post a Proximitask download link if any of them worked anymore, but if you still have it on your iPhone and use it all the time like I do for indoor location based reminders via iBeacons, you may have run into one annoying bug: you mark a reminder as done, but the reminder sometimes persists to pop up.  Here’s a way to permanently quiet those reminders… Continue reading

Using your university’s free Apple Developer account to eliminate the “Unknown Developer” Error in your 3rd-party-developed macOS App

If you work for a university and have developed a macOS app (as a part of your academic job) using 3rd party software (e.g. a Java app developed with Eclipse and built with Gradle), you’re probably familiar with telling your users how to deal with the annoying “Unidentified Developer” error they get when they double-click your app:


They get a window saying “<your app> can’t be opened because it is from an unidentified developer“.  The user is given no clear option on how to run the app except a vague reference to “security preferences”.

There are things the user can do to get around this error without you becoming an “identified developer”.  A user can perform a one-time bypass by right-clicking the app and selecting open or they can muck around with their Security & Privacy System Preferences settings.  They can even execute some commands in the Terminal to reveal a setting that has been hidden in the past few versions of macOS to always allow apps from anywhere.  But what would be nicer is to eliminate this error so that the user doesn’t have to do any of that.  Normally that involves giving Apple money to pay for membership in their developer program, but if you’re in academia, Apple has free such accounts for “Educational Institutions”.

Chances are, your university has already enrolled in this program and all you have to do is hook into that resource.  But be aware that universities have an image to uphold and that digital identity extends into the App Store, so they’re not likely to welcome any app to sit alongside their custom campus, reunions, and transit apps.  You can belay their fears about your app by noting that you intend to distribute your app outside of the App Store.  Users who download your app won’t even ever see the university’s name unless you added it to your app yourself.  All you need is a certificate that will allow you to code-sign your app so that Apple can know who you are.

It took me awhile to navigate this system.  I initially ran off on this tangent trying to create a free “education” Apple Developer account by digging up and supplying my University’s D-U-N-S number, official address, etc… and ran into a form that asked me to assert that I could commit the university to legally binding agreements, at which point I realized that I was on the wrong path.  Free educational institution Apple Developer accounts aren’t per person, faculty, or department.  They’re 1 per university.  I already had a couple of official university apps on my iPhone, so I knew there already existed an account, and made a number of calls before I got put in touch with the Apple Developer Account “holder”.

Those in charge of the Apple Developer Account here were only familiar with iOS app development, so they didn’t know how to advise me on accomplishing what I wanted to accomplish.  My sole goal was to eliminate the “Unidentified Developer” error.  No-one knew whether that meant I had to distribute my app on the app store or what, and they were of course concerned about the app showing up alongside all their campus-centric apps.  I managed to convince them that I wouldn’t be distributing on the app store and that I believed all I needed was a code-signing certificate.  Since no-one here knew how to do that, I called Apple again.

Apple really pushes their developers into Apple’s canned development resources (XCode) to do their development.  In fact, even their developer support team members tend not to know anything about code-signing and certificates, because it’s all handled in the background behind XCode.  I had numerous phone calls with Apple Developer Support and they proclaimed that it sounded like I was “speaking a different language”.  They weren’t even familiar with the “Unidentified Developer” error and immediately referred me to the makers of the 3rd party development apps I was using, implying it was a problem with their software.  I persisted however, because I had already tried code-signing using apple’s codesign command line utility and managed to get them to at least confirm that what I suspected was happening was happening.  And that is, that not any certificate will do… but I’m getting ahead of myself.

Here, I will walk you through, in detail, the steps I took to eliminate the error from my latest app (TreeView3)… Continue reading

Today’s Apple Feedback: Underlined Event Day in Mail Wrong When Tap-creating an Event

I’d been victim to this bug and forgetting about work meetings a few times recently – and I knew I’d created an event with a reminder for each forgotten meeting! Luckily the meetings were in my office and I was in the vicinity the couple times it had happened recently (and this tends to happen for Monday meetings most frequently). This morning, Friday May 11, I got a confirmation email for a meeting at 1:30 on Monday.  I underlined that text, because that’s how it appeared in Mail, as you’ll see in the screenshot below.  Apple had detected the event time/day text and underlined it so that I could conveniently create a meeting appointment in my calendar app and I knew it would have my default 1-day prior alert. So I tapped the text and entered the meeting title and location and observed that the default-entered time was from 1:30 to 2:30.  I didn’t check the day!  But I knew that events had gone missing in the past, so after creating the event, I set a reminder to double-check it was still there when I got to work.  I had assumed that the events were somehow getting deleted via some sync issue.

When I got to work, I double-checked my calendar and the event wasn’t there!  I then searched my calendar and discovered that the event had been created for Thursday May 10th instead of the expected Monday May 14th!  And today (when I created the event) is Friday May 11th!  Thus, Today’s Apple (iPhone) Feedback:

Taping underlined event time/day in mail creates event yesterday instead of underlined weekday

On Friday May 11, I created an event via the underlined text: “1:30 on Monday” in Mail on my iPhone 6S. I’d noticed events created on my iPhone going missing in the past, so I created a reminder to check my calendar when I got in. It was missing!, so I searched for it. It had been created for Thursday (yesterday!). I hadn’t touched the day when I created the event. All I had done was add a title & enter a location. I observed the time was 1:30, but hadn’t double-checked the day. I just did it again & it’s still creating the event on Thursday!:

Please fix this. If the underlined text tapped says “Monday”, should be created on Monday by default!

Note, I had pasted URLs to my screenshots because Apple’s feedback form doesn’t allow you to attach images.

I’m guessing that the wrong day possibly came from the fact that the email thread discussing a possible meeting time started on Thursday.  Plus, the first underlined proposal of 1:30 didn’t have a day of the week underlined with it.  So my guess is that that underlined time got associated with the current day (even though it was past 1:30 on Thursday when we started emailing about meeting).  And it seems possible, albeit not a good design decision, that when you tap underlined text to create an event in Mail, that despite the particulars of the specific underlined text, that Apple is re-parsing the entire email to extract what it thinks the intended day & time of the event is likely to be.  It’s just getting it wrong in this case.

If you don’t want to miss meetings because of this but, please consider echoing my Apple Feedback.