Douglas Hill’s posts in 2021

1 January 2021

Were calendars on your mind? They were on mine, because I added a UIDatePicker subclass to KeyboardKit that supports spatial navigation using arrow keys. github.com/douglashill/KeyboardKit/pull/14

»

9 January 2021

Some time ago I found the minimal Siri command to set a timer was:

“timer x minutes”

Now I found I can just do:

“x minutes” »

13 January 2021

Sent my yearly email to the US NSA to declare that I’m exporting a class 5D992 encryption product. (I.e. shipped an app that uses HTTPS.) »

21 January 2021

Is there a way to keep a type as generic in Swift? I don’t know or care that the identifier types would be — they can stay generic. I tried specifying <Any, Any>, <AnyHashable, AnyHashable> and <Hashable, Hashable> and none of these work.

»

Just learned from @atpfm that the Apple Feedback app is built into iOS. To open it you must navigate to applefeedback:// in Safari. 🧐

The app is:

From which it seems:

27 January 2021

Am I the only one who finds @tweetbot putting the version number right before the duration a tad confusing? It would be very cheap if it renewed every six months/years.

1 hour later: (To be clear, I think Tweetbot is a very nice app and will subscribe.) »

13 February 2021

This is neat. A handy command line tool for looking up localisations in Apple’s glossaries based on some of what I wrote up in douglashill.co/localisation-using-apples-glossaries/ twitter.com/_julianschiavo/status/1360424081137410050 »

18 February 2021

Hoping for a limited contacts API in iOS 15 like iOS 14’s limited photo library. Situation seems the same: system already provides an out-of-process picker which is easiest to implement and protects privacy.

Some apps build their own UI so they can request full access and collect user data while making it look useful to the user. Solution is to put the user in control (and hopefully the degraded UX pushes apps to just do the right thing in the first place). »

22 February 2021

😳 Eye-opening indeed. Wow, in the worst possible way. twitter.com/keleftheriou/status/1361340761774559234 »

26 February 2021

Fantastic reply 🤣 twitter.com/deBaer/status/1362576215333347333 »

9 March 2021

👍🥳🙌🎉👏 twitter.com/simonbs/status/1369224699021062145 »

12 March 2021

Me: Hey UIDatePicker, I’d prefer you to use the compact style to fit nicely in this list cell.

UIDatePicker: I feel more like the fancy wheels style, and I have the final say.

_UIDatePickerView: How dare you show a wheels picker with the Mac idiom! I’m going to crash your app. »

24 March 2021

Remember all the fuss about Zoom running a secret web server on your computer? Looks like Figma does it too for the same reason: to open links without repeated confirmation. help.figma.com/hc/en-us/articles/360039956894

See also help.figma.com/hc/en-us/articles/360039824334

Every time you open the Figma app, FigmaAgent is started again and added to Login Items. If you don’t need Figma to show fonts on your computer and opening links manually is fine, then removing FigmaAgent is an option.

This seems to work for removing FigmaAgent:

Figma is a great design tool, and the good news is that at least for me it seems to operate fine without its agent. »

25 March 2021

I just noticed that Keynote, Pages and Numbers jumped from version 5.2.1 to version 10.0. But weirdly they weren’t called Keynote X, Pages X and Numbers X. I thought that was the thing to do. support.apple.com/en-ie/HT207242 »

28 March 2021

Just received a reply from Apple about my bug report “iTunes does not remove previously synced photos” from January 2012. So grateful we have iCloud Photo Library now! »

It’s easy to see all the container ships going through the Suez Canal on Apple Maps or similar.

50 minutes later: (Perhaps I should say normally going through the Suez Canal.) »

31 March 2021

I’m so pleased to see this out! New component on Web and iOS — I love how the design feels similar across platforms while being at home on each. On iOS we use SwiftUI, which is really nice, although we needed a lot of back-and-forth with UIKit. twitter.com/PSPDFKit/status/1377334681645899776 »

2 April 2021

MacBook Pro is somehow never asking for password/TouchID when waking from sleep, despite being set to require this immediately. Restart didn’t help, so I have to remember to select ‘Lock Screen’ before shutting it. 😞 »

3 April 2021

Say in the Apple TV iPad app I want to get from an item in Up Next that’s available on Prime Video to that item’s detail page to buy it from iTunes Movies. Easiest way seems to be: contextual menu > Share > @OpenerApp > Open Link in Apple TV

Opener is such a useful tool, not just for gluing apps together but for gluing apps back to themselves. »

6 April 2021

I didn’t know there was a web API to show the native share sheet (AKA UIActivityViewController) — Navigator.share() developer.mozilla.org/en-US/docs/Web/API/Navigator/share

Tweets on twitter.com use this. »

12 April 2021

Wow Microsoft have a lot of live iOS apps — over 90! Including What Dog, which explicitly has no functionality anymore but sounds like it was fun. apps.apple.com/gb/app/what-dog-experiment/id1050367912

»

13 April 2021

NSLondon is happening this Thursday evening! twitter.com/NSLondonMeetup/status/1379702001135726592 »

16 April 2021

After spending a couple of evenings trying to transfer Nintendo Switch data to a larger SD card, my recommendation is to not to attempt this unless you have Microsoft Windows. Instead delete old games to make space for new ones. »

20 April 2021

I thought I saw the iPad camera on the long edge in the #AppleEvent video but looking at the webpage now it’s on the short edge as before. »

16 May 2021

Saved nearly 1 GB on my iPad by deleting and reinstalling the Apple Developer app. »

20 May 2021

Best way to summarise 2 weeks and 6 days ago? »

24 May 2021

Sending a message to nil is supposed to do nothing in Objective-C, but… apparently not? A local variable that was not nil is changed to nil.

gist.github.com/douglashill/cf9c3839f76db5ac5351e695fd493fd0

»

Given no context, the clear popular vote is to summarise 2 weeks and 6 days as 3 weeks. Interestingly, both RelativeDateTimeFormatter and GitUp’s date formatting (which is what I was looking at) round down and show this as 2 weeks. twitter.com/qdoug/status/1395467715586953218

»

27 May 2021

WWDC is no longer the main thing happening that week — COVID vaccine booked! »

Just booted up Pokémon Leaf Green on my GBA. When you load your save, it gives you a little recap of what you were doing last time. Very useful for coming back after 15 years. »

28 May 2021

To me the best way to use an Apple TV is to use an iPad/iPhone and AirPlay instead. Now if only all apps supported AirPlay… »

1 June 2021

Six years at @PSPDFKit »

2 June 2021

My iPad-focused WWDC wish list from last year was esoteric enough that most of it is still relevant. Yay — no need to write a new post! douglashill.co/wwdc-2020-wish-list/

I’m still so pleased with the photos privacy from iOS 14. That seemed like one of my most peculiar wishes, but it was the main one that actually happened, and it was done much better than any way I could dream up. »

3 June 2021

This is really fun! twitter.com/RalfEbert/status/1400116895618109445 »

4 June 2021

In other words: Dark Sky rain in Siri would be neat. The weather widget can do it. »

6 June 2021

I did a bit of prep for possible WWDC labs today, but by extracting my problems into sample projects I managed to find solutions on my own. 🎉 »

7 June 2021

I’m aiming to sleep at my normal time in WWDC week, so State of the Union is Tue morning for me. Am I showing my age? »

Had to move the WWDC stream from my iPad to Mac to write this tweet because of the bug where hardware keyboards don‘t work on iPad while PiP is active… »

The Shelf is real »

Keyboard control for multitasking 👍👍👍👍👍 »

Universal Control between iPad and Mac sounds useful.

»

I am a fan of keyboard navigation. Really looking forward to this. twitter.com/_mochs/status/1401984108171993090 »

I’m optimistic about the iPad multitasking changes. The existing system works well for 90% of what I want, and the new functionality looks like it will make most of that last 10% smoother. »

8 June 2021

Today’s WWDC session videos just went up for me. »

High level API to force decoding a UIImage 🤩

»

The new formatter API is that there is no formatter. Pretty neat API design. developer.apple.com/wwdc21/10109 twitter.com/gemmakbarlow/status/1402351348037849095 »

I asked in the Core Data lab about full text search. I thought this would be about text normalisation, stemming, and most efficient query structure, but no: Let Spotlight do the hard work with NSCoreDataCoreSpotlightDelegate. Then use this for in-app search with CSSearchQuery. 😎

The session on Core Data full text search will go up tomorrow developer.apple.com/wwdc21/10098

The sample code for Core Data full text search is up now: developer.apple.com/documentation/coredata/nspersistentstorecoordinator/showcase_app_data_in_spotlight »

9 June 2021

One of the many screens in the Apple Developer app lets you bookmark labs by swiping. None of the other screens do, so I think this might be a bug. But now I can’t find that screen to un-bookmark this lab!

»

Make sure you’re following @felibe444 for all these amazing sketch notes. twitter.com/felibe444/status/1402539682580238336 »

These new half modal sheets with UISheetPresentationController are looking superb. developer.apple.com/wwdc21/10063

I wrote about adaptive custom presentation controllers in 2015. It never worked well. It looks like the system now does everything we’d need, so we’ll be able to drop our custom approach in a couple of years. pspdfkit.com/blog/2015/presentation-controllers/ »

I really like the look of CloudKit’s new support for encryption. You can’t use encrypted fields in queries because the server can’t read them, but otherwise I don’t see any downsides. See developer.apple.com/wwdc21/10086 and developer.apple.com/documentation/cloudkit/ckrecord/3746821-encryptedvalues

»

10 June 2021

There’s untapped potential with night trains. twitter.com/jonworth/status/1402902268622610432 »

💛 swiftpackageindex.com/douglashill 💛

»

11 June 2021

Uh oh Webex and Zoom open at the same time. Seems like one of those things that shouldn’t be done. »

I made it to eight fantastic labs this week, and I really appreciated the patience and helpfulness of everyone! It makes no sense to me that labs have been opened up so much by going remote and yet it seems to be easier to get a slot. »

14 June 2021

Did someone already make a website that shows how macOS versions map to iOS versions with Mac Catalyst? Would you have guessed that macOS 11.3.1 uses iOS 14.5? »

22 June 2021

iOS 15 fixes pressing shift + up to select text ending up selecting to the start of the document when there is no glyph on the line above directly above the insertion point due to wrapping. Hard to explain but much appreciated.

As in, previously if you had the insertion point where the screenshot shows and pressed shift + up twice then the selection would be messed up, but now it works. »

iOS 15 lets you access Spotlight from the unlocked lock screen on iPad. Very nice little refinement. »

24 June 2021

New in iOS 15: iPhone apps that only support portrait appear the right way up on a landscape iPad. I don’t need to use my banks sideways anymore! 🙃

This leads me to think that being able to put iPhone apps in Split View and Slide Over would be a nice next step.

Or more apps could support iPad. It’s as easy as Mac Catalyst: You just have to check the iPad checkbox. Right!? 😇 »

25 June 2021

Hmm that photo of a road looks familiar. Nice work. twitter.com/kcase/status/1408059056846041096 »

27 June 2021

I only just realised you can install 1Password from the Mac App Store. This means it can be installed and updated without an admin password, which is nicer — especially for my parents’ computers. »

5 July 2021

It’s good that Xcode 13 has a mixed setting for showing file name extensions. I don’t need to see “.swift” all the time, but being able to distinguish header files in C-based languages is really important.

»

8 July 2021

I’ve been rapidly switching the default web browser on my iPad on the iOS 15 beta between Safari and Firefox. Unfortunately neither is stable and polished enough at this point for my work.

On the other hand, the improved keyboard control on iOS 15 such as being able to toggle Slide Over from the keyboard is a big productivity boost even on the beta. »

Cool that I could capture this with my 2016 iPhone SE thanks to @halidecamera. Caterpillar was swinging a lot and too small for autofocus to find.

»

9 July 2021

Is there a nice way to conditionally compile Swift to use new API in beta Xcode but also compile with stable Xcode? Basically #ifdef __IPHONE_15_0 but in Swift. The only thing I can think of is setting up conditional build settings using XCODE_VERSION_MAJOR. »

This is one of my favourite changes in iOS 15, especially since I was told in labs just a year ago that this behaviour was unlikely to change. Lots of apps have bugs due to the old behaviour. Source: developer.apple.com/documentation/ios-ipados-release-notes/ios-ipados-15-beta-release-notes

»

15 July 2021

Weirdest bug on iOS 15 beta is sometimes it gets in a state where typing ‘e’ shows the Emoji picker. All keys except ‘e’ type text as normal. »

22 July 2021

I only just realised you can use Wi-Fi calling to receive text messages. I’m going to turn this on briefly to receive SMS security codes at home where we have at best 1 bar of 3G.

(I wouldn’t turn Wi-Fi calling on all the time because it puts too much text in the status bar on iPhones with home buttons.) »

25 July 2021

Treasure acquired. The only place you can download this Zelda is on Wii U, so the original form is the best way to play it.

»

29 July 2021

Normal way to communicate: “Therefore we rejected your app.”

How app review communicates: “We understand this may prevent the app from being approved for the Mac App Store.” »

With Safari on iPad on beta 4 I wish I could have the compact tab bar layout but with the buttons of the traditional layout. (I.e. replace the … button with AA and reload.) »

4 August 2021

A story

»

9 August 2021

On iOS 15, NSDataDetector stops when it finds the word “air”. Credit to @bukovinski for finding this.

»

11 August 2021

This post is a terrific masterclass in debugging by disassembling. twitter.com/PSPDFKit/status/1425479679897653248 »

23 August 2021

When using Timer or CADisplayLink I’m always confused if I want the common or default RunLoop Mode. Summary:

A common bug is that a timer or display link isn’t firing while scrolling. Fix this by changing the run loop mode from default to common. »

25 August 2021

It seems you can still run an Extension of an expired TestFlight app. »

14 September 2021

As expected, building for Mac Catalyst with the Xcode 13 release candidate uses the iOS 14 SDK. However it uses Swift 5.5. I’ve just updated all our usage of new API to guarded by:

#if swift(>=5.5) && !targetEnvironment(macCatalyst)
...
#endif

»

15 September 2021

Yay back to jumping though silly hoops to open the Apple Feedback app on iPad. The trick is to open the URL applefeedback:// The app is killed and removed from the app switcher as soon as you switch away from it.

I filed a lot of feedbacks over the summer. The fact that the app is back to being seemingly deliberately hard to access is the main reason I will stop now. »

Comparing the new iPad mini (6th generation) to previous iPad mini models. Read more »

16 September 2021

+1. Trees are better than conference gear. @NSSpain was a lot of fun last year. Highly recommended! twitter.com/steipete/status/1438445602367549441 »

Can confirm. With Xcode 13’s C++ compiler, the isnan function seems to always return false when compiling with optimisations and GCC_FAST_MATH. Damn, that’s well optimised! twitter.com/bukovinski/status/1438481013706039299 »

17 September 2021

AirPods on Nintendo Switch:

It’s a peculiar weakness of the Switch that the headphone jack is so quiet. Testing with the same headphones, the Switch is considerably quieter than the Nintendo DS Lite.

16 hours later: More observations about AirPods on Switch:

20 September 2021

This is why I set the region on my devices to Ireland. You lose Apple News, but you gain more sensible units. twitter.com/willlowther/status/1439623162476568581 »

21 September 2021

Tip: Put spaces around URLs in Markdown links so cmd-click works in Xcode. Otherwise Xcode detects the ) and any other trailing punctuation as part of the link.

»

22 September 2021

iOS 4 on iPhone 3G was rough. It’s interesting to remember that was only two years after release. Things are so much better these days. twitter.com/iCave_Dave/status/1440016935991775237 »

And then you have Google Docs, where documents may or may not be stored in a directory structure. It’s still unclear to me. twitter.com/reckless/status/1440656107563749386 »

23 September 2021

FB9213735 filed on 27 June twitter.com/jckarter/status/1440820654157099017 »

I’m on board with pages of apps being a thing of the past on iPad. Dock + Spotlight works well for me.

»

24 September 2021

NSLondoners, we’re trying to get a sense of how you feel about attending events right now. twitter.com/NSLondonMeetup/status/1441325050376822785 »

25 September 2021

I’ve never understood why seemingly all podcast apps display the artwork of the playing show so large. I haven’t yet found a podcast with artwork so good that I want to see it in high resolution day after day. »

26 September 2021

Safari 15 LGTM. No tabs: no problems.

»

I don’t, because I never had it 🙃 twitter.com/kuba_suder/status/1442157893768335363 »

4 October 2021

Huddersfield is missing

»

With Xcode 13, you can quickly toggle line wrapping per editor. Nice because I prefer horizontal scrolling in code but wrapping in Markdown.

»

6 October 2021

I’m very excited to have left the house and be on the train to @swift_leeds! What is this outside world? »

8 October 2021

Spotlight on iPad should let you type ‘system preferences’ and Spotlight on Mac should let you type ‘settings’. (FB9687122) »

12 October 2021

I just wished iMessage was more like Zendesk. Send help. »

14 October 2021

Notes on updating to macOS Monterey:

Otherwise I wouldn’t have noticed. Smooth update 👍 »

19 October 2021

Very interested to see how the MacBook Pro notch works with full screen apps. It would be great if full screen apps could always show the menu bar. To me, full screen is not about hiding UI but about “don’t put windows on top of this one”. »

Confession: I’m willingly using the compact tab bar in Safari on iPad. It looks nicer. Please don’t judge! »

20 October 2021

Hetzner data centres are also 100% powered by clean and renewable energy (hydro in this case). ❤️ twitter.com/steipete/status/1450842870345261059 »

22 October 2021

Any recommendations sites estimating iOS version usage stats? Preferably not from a single app. Apple’s stats aren‘t kept updated and only go back 2 versions before grouping as ‘Earlier’ — and those older versions are the main thing I’m interested in. developer.apple.com/support/app-store/ »

28 October 2021

⚠️ Watch out for this: With Catalyst apps on macOS 12.0.1, clicking Add to Photos in UIActivityViewController will disable almost all the app’s menu items and toolbar buttons. App needs relaunching. (Filed as FB9727325) »

2 November 2021

We’re looking for an experienced iOS developer to join my team at @PSPDFKit. I’ve been here over 6 years so clearly I recommend it! Details at jobs.lever.co/pspdfkit/8a0bd156-4844-418b-82dd-fab8ef077a0d

DM me with questions!

A few things I really enjoy about working here:

We’re seeing a new crash on iOS 15 that looks like it’s from UIDocumentBrowserViewController internals: Trying to prepare a DOCItem in mode 1 without using bookmark and with a nil _wrapper (FB9735753) »

I wrote a post on our company blog starting from the basics and explaining deprecation and how it allows API to evolve over time. Since our main product is a framework, we think about this stuff a lot. Read more »

We’re not just hiring on iOS. In fact, we have openings all across the company: pspdfkit.com/company/careers/ twitter.com/radazzouz/status/1455622444849500169 »

3 November 2021

Mixed messages

»

4 November 2021

We’re looking for speakers in London. Talking at meetups is a great way to share something you’ve learned recently in iOS development. twitter.com/NSLondonMeetup/status/1456198389377519616 »

11 November 2021

It’s 11:11 on 11/11 and I’m preparing PSPDFKit 11.1.1.

1 hour later: Another fun fact with 11s: @steipete released 11 versions of PSPDFKit in Nov 2011. Iterate fast at first => end up with a product that’s still going strong a decade later. pspdfkit.com/changelog/ios/#1.7.4 »

23 Oct 2021: I release a version of my AutoSave extension for Panic’s Nova that works properly. github.com/douglashill/nova-autosave

8 Nov 2021: Panic releases Nova 8, which has automatic saving as a built-in feature.

Good outcome in the end. I can take away learning a bit of JavaScript, but I kind of wish I’d waited a couple of weeks. »

17 November 2021

Not sure if it’s a bug or feature that when a timer finishes on my iPad, it plays through both AirPods AND the iPad speakers. »

30 November 2021

Is anyone else seeing App Store Connect analytics not reporting any sessions or active devices on macOS 12 Monterey? It makes it look like 100% of Mac users are on Big Sur. »

1 December 2021

30 mins until NSLondon sign ups open. I’m really excited for this event! twitter.com/NSLondonMeetup/status/1465968966619303939 »

8 December 2021

I’ve been in cookery school all day, and now I’m excited to be on my way into town for our first IRL @NSLondonMeetup in a long time. It’s a good day! »

17 December 2021

France not allowing entry from the UK makes getting to anywhere in Europe pretty tricky. I’d have to take the much longer way around with a ferry to the Netherlands. (Or fly, which is not something I’m considering.) Plans paused. »

Any suggestions these days for publicly readable file hosting? We have about 2 GB of NSLondon video that we’ll gradually add to. They’ll be uploaded once and downloaded many times. Amazon S3 is the classic choice, but maybe there’s something better. »

+1 twitter.com/John_Gilbey/status/1471948005485993995 »

20 December 2021

Thanks to App Privacy report in iOS 15.2, we can see several Apple apps access Contacts without asking for permission. Of course Mail and Messages are, and that’s useful. Not sure about Feedback and TestFlight though. »

22 December 2021

Looks like my non-serious offer to make vegan ramen for Christmas lunch was accepted seriously. Is how traditions are born!? »