While working on the iPad UI variant for our iPhone video subtitles app Captionista, I noticed that when swiping to dismiss in compact horizontal size class or on iPhone, the popover transition freaks out — as recently as iOS 14.1 and SwiftUI 2.
Colouring the arrow of a Popover in SwiftUI
If you have custom background colours or e.g. force dark mode on your View as we do in Captionista, you will be sad to discover that the popover
in SwiftUI draws the arrow without allowing you to colour it. If you use a NavigationView
this is hidden from you as the navigation bar “fills” the arrow space also, but if you don’t… you end up with the system background colour in the arrow, and your custom colour in the body of the popover.
Me: “Why is my SwiftUI view not updating when the model changes?”
The initialisers of Views in SwiftUI have some surprising and obscure behaviours related to state. If you’ve used SwiftUI at all you will likely have discovered this.
In addition, the rules around how properties that are wrapped with Property Wrappers are accessed are interesting when inside the initialiser of the type. It is this latter issue that bit me.
xCloud and its ilk should never be allowed on the App Store
This was originally posted as a tweet storm, preserved here for those who prefer an old fashioned post
I think the whole Apple and MSFT xCloud spat is not really much about MSFT and games and content review. It’s about preventing alternative app stores, which is a longstanding App Store rule. Buckle up! 👨🚒
[Note that this is all my opinion only and in no way indicative of the views of my client]
The nub of it is that Microsoft want to make more money from their games but don’t want to bother porting them to iOS/macOS. They’d rather have you pay to use their data centres to stream the existing code they have.
Once this kind of cloud streaming of games is allowed, it’s not a stretch to think someone else will do this with other kinds of apps. Maybe in 2021 we get an “aCloud” that lets you run Android apps on iOS by streaming them. Yay! Nope 😡
As Jason Snell explained in Upgrade this week (but is not Jason’s view), this can be seen from Apple’s perspective as devaluing the entire Apple platform prospect. Apple devices reduced to input/output “pipes” are not differentiated enough.
Imagine this but for almost all apps. That don’t integrate with all the things Apple has made possible; Apple Pay, PassKit, Widgets, Siri Intents, Siri Suggestions, iCloud etc.
How would Apple be able to deny other such streaming app store-like apps if it accepts gaming ones? Why are games different? What makes a game? Gamify your To-Do list app and you’re in!
It is my belief this would hold back tech progress for all of us if “commodity” users move to other platforms due to lack of differentiation. Apple’s life-improving features need mass adoption.
Consider a world where 2007 and the iPhone never happened. Our current tech timeline was not inevitable, and we have a lot to thank Apple for. Read the full thread before you “ha fanbois!” me.
We all love to complain about how even very large companies don’t bother making native Mac client apps, so we know this “well we can compromise on X to launch quicker and cheaper” attitude is common.
I don’t really think we’d see a streamed version of Office 365 but… who knows. These are commercial decisions from brutal capitalist beasts like Microsoft. You can see the argument “…why are we spending $$$$$ on developing MS Word for iOS?”
If general app streaming existed it could become commonplace – one or two “killer” apps like the next TikTok debut there and younger users go to the new “app store” in droves and the service owns their identity for all apps.
Then it becomes the “place to be” to launch new apps because it has a big audience. As a hardware and OS maker the last thing you want is people bypassing everything you’ve created.
(Ironically it seems this has already happened to some extent with WeChat, though I have never used it and limited to China. It seems the relationship with Chinese infrastructure & politics plays a large part here.)
Importantly, you clearly can’t do as much to protect user’s privacy when you don’t require app review and use of native device APIs. You might be able to require a transferable security and privacy policy that the sub-store must apply?
It’s true that the “Reader app” categorisation is a really hard argument to settle as it relies on very precise descriptions of what content actually is — a movie is content, a game is content, is a utility app content?
Is a mail app content? Is your To-Do list content? Most of these can be done with web-apps already but people who appreciate native experience know this usually sucks. The web is effectively app streaming, and the same issues apply there.
This would dilute the value of the native experience and we’d maybe even end up with web apps being streamed like a game 🤯. Yes, you can bet somebody would try this as a “great low-cost cross platform app solution”.
Do we really want iOS and iPadOS to become like macOS where people don’t bother making native apps anymore because there’s a cheap and lazy alternative?
Accepting streaming of apps, games or otherwise, is how you get there. Apple know this, because it has already happened to the Mac. This is in part why iOS apps are coming to the Mac! Doh!
Once we have a streaming app portal to any other apps, then it probably becomes “stream WebGL games through our webCloud app”… and then “use androidCloud to stream webCloud to run your favourite WebGL games from 2015” 🤦♂️
Don’t tell me people won’t do this stuff. People do this stuff all the time with emulators and VMs, and they are useful or fun toys for niche uses, but it should never be the norm.
There are already Mac, PC and Atari ST emulators in the browser after all: https://jamesfriend.com.au/pce-js/ (yes, spare me the irony that Apple won’t allow native versions of such emulators in the store, so “yay for web”!)
Let’s backtrack and ask on what do I base this view? I’ve been contracting long enough to see this cycle over & over. I’ve written assembly on the Atari ST, native DOS & Windows apps, Java desktop apps and J2ME phone apps.
I have worked on many web front- and back-ends and native apps for Apple Platforms, even touching on a React Native code base under duress. I never expected to end up back doing native coding, but I’m here for the great UX and superior product.
I’ve been in many web vs. native arguments before, and didn’t expect this MSFT xCloud issue to end up here but 🤷♂️
Right now we’re still in the phase where people incorrectly assume “writing web apps for mobile is the best solution”. WebAssembly and WebGL exist now. HTML Canvas has existed for a while. These are bad app stacks.
When canvas was announced years ago I predicted people would build custom UI components with it to make native-seeming “web apps”. Sure enough, here’s one example of this terrible idea made flesh http://www.zebkit.org/light/about.html
If there’s one thing I’ve learned it’s to never underestimate the propensity of smart developers to create stupid software stacks. This is fine for fun projects, but for the entire world it is definitely not.
There was Quake running inside Netscape in the late 90s (amazing job Niclas Thistle!). There were Java’s UI toolkits that assumed all OSes should have identical UI behaviours and just look a bit different. Sun’s dumb Java terminals? 🙅♂️
We’ve had web-based VNC streaming of remote desktops (just to work around firewall/software install policy issues) and now full-fledged “desktop” apps like Figma in the browser (Also not a fan, though technically impressive)
These things exist due to a mixture of “because we can” (just about), cost cutting / commercial pressures, and compromises e.g. there is no great native cross-platform collaboration protocol so web-based apps can win hearts in an org.
[They should be fixing that by the way — Apple, Google and Microsoft. Oh, except they won’t because Google and Microsoft are all about the web and Apple is slow to open up iCloud for interop.]
“Single code base!”
“Nothing to install!”
“Collaborate!”
“Continuous updates!”
It sounds great. The flip-side: usually a sub-par experience for all, vastly variable experience based on hardware, energy efficiency, offline etc. the usual stuff.
Most of the pro’s and con’s are about who is making money and how. A web service makes billions at the cost of millions of users having a daily experience that is lacklustre. MSFT Teams is a great example of this. Awful.
There are externalities to figure on both sides: energy use (and whether renewable) by server or device, performance, privacy, security, offline availability, and the more fuzzy and oft ignored ones…
…such as user happiness, frustration, productivity / time efficiency. These really matter but are rarely considered on a macro scale even by many UX designers. When things don’t go smoothly it affects our stress and emotional wellbeing.
Most of these externalities all get cancelled out by capitalism and inadequate investment in education for all. Ship fast and cheaply, using people who don’t need in-depth skills who we can hire easily because there’s a ton of them just raring to go.
I am not for a moment saying development should be hard and exclusive. I despise how complicated it is making apps native or otherwise. We should all just be waving our hands in the air and making things from blocks.
However we are nowhere near that and I don’t think we ever will get there. While many devs like me don’t have formal discipline, we ARE engineering and this is what the job requires for a result that factors in the externalities.
This is all that is wrong with our world. It’s why you can’t buy well made furniture unless you are rich and you’re left with chipboard and plywood crap you recycle a few years later instead of keeping it in your family for generations.
Let’s be clear: Apple is a company. It makes a lot of money. That’s why companies exist. It also has propelled us into the future. We give this up at our own peril, and I think the App Store issue is surprisingly, the keystone of this.
If the tide of app development shifts further to web and (shudder) streaming, and Apple’s fortunes turn because you might as well get commodity hardware to run your apps… we’re all screwed.
Don’t @ me with arguments in favour of web or React Native approaches. I know, you think it’s awesome that’s fine.
YES, GOOD NATIVE DEV IS REALLY HARD. I wish it was easier. That’s what we should all focus on fixing. (Microsoft however have no excuse. They have tons of money and resources to port the games).
It’s capitalism bullshit in the bigger picture, including the fact Apple earns so much and has this power. I however much prefer this and more tech progress than the Idiocratisation of software experiences.
Remembering Tim Smith of Cardiacs
Today we heard the sad news that Tim Smith passed away.
I was lucky to discover Cardiacs, the band Tim is best known for leading, when I was 18 or so (we’re talking around 1991). A friend told me that I just had to go and see this amazing band he saw recently, so we went off to The Venue in New Cross, London and it was close to a religious experience, despite not knowing any of the songs. Utterly unlike anything I had heard before. I devoured the back catalogue and awaited every new release, though they were fairly infrequent.
I became fairly obsessed, as many Cardiacs fans do, with the band shrouded in a somewhat cultivated mystery. Bizarrely I discovered that the band ran their own label and were based in Kingston-upon-Thames, my home town. Not only that, I recalled seeing Cardiacs posters fly-posted on fencing around an abandoned site at the end of my road when I was many years younger.
Then I found out that for years as I walked to school I was unknowingly walking past Tim and his then-wife Sarah’s house every day.
Many amazing gigs, new friends, two Cardiacs-obsessed girlfriends and musical discoveries later, in the late 90s the web became a thing and I was an early web developer. I contacted the band, insisting that they needed a website to spread the word internationally. Recall that in those days it was hard to get vinyl or CDs from small bands internationally, and Cardiacs had a global following but rarely toured outside the UK. I eventually first met Tim in person to discuss this after one of their shows at The Fleece in Bristol.
So this was how, for several years I ended up working and becoming friends with brothers Tim and Jim. Together we created the original and later re-imaginings of the cardiacs.com
website, with me often hamfistedly learning how to manifest their vision for the band’s online presence. We built the label’s own online mail order system before this was really a thing, had a thriving email mailing list before Facebook existed and in the early 2000s I was busy ripping CDs and scanning artwork to upload the majority of the Cardiacs catalogue to the newly popular iTunes Store.
In another odd twist of fate I had moved across the country to Salisbury and Tim soon after relocated a mere 15 minute drive away. This was where I got to help Tim with his computer issues with his Mac at times, an improvement because until that time he had still been using an Atari ST to sequence much of the band’s music, something simultaneously terrifying and admirable in the early 2000s.
As a Mac newbie myself I would complain to him about how annoying it was that nothing seemed to work on his first-gen iMac and that the web browser was so bad. Little did we know that 10 years later I would end up becoming an Apple platform-obsessed iOS developer, but it no doubt played a part in me switching to Macs as an experiment in 2005. A few years later I became too busy with my work and young family to work on the Cardiacs site and iTunes stuff so I handed over the reins to a kind volunteer. For fifteen years or so Cardiacs music was the soundtrack to my life.
It was always frustrating that Tim did not get the attention he and the other band members so deserved. His house literally had piles of handwritten music manuscripts lying around and I once asked him what a pile of it was and he said it was just tunes he’d jotted down but not done anything with yet. We’re talking hundreds of pages. I also asked him how he came up with music and at least some of it he said he could just hear in his head and he’d write it down, without even having an instrument with him. There are not many people in this world who can do that with such a pleasing result.
He cared intensely about every aspect of the art of music, beyond the tunes and the production to the visual representation of covers, t-shirts and live performance, including very precise direction even on spoken word sections of live intros. They did such amazing things with so few resources and the support of so many committed friends.
Once I raved at him about how underrated the band was, and he said “Ahhh it’s just tunes, man” with his famous grin, which I found difficult to take on board as a fan. Tim had to deal with far too much shit in his life, and in hindsight I think that plus all of the fan expectation was sometimes a heavy load to carry.
Tim played a part in a lot of interesting music in the 90s/00s, with involvement and sometimes production with bands like Levitation, Oceansize, Sidi Bou Said, The Monsoon Bassoon and William D. Drake. You should definitely check out not only Cardiacs but The Sea Nymphs and Spratleys Japs for the musical delights he has left us. There is a great musical write-up and links to videos by Mike Vennart formerly of Oceansize, live guitarist for Biffy Clyro that is well worth a read.
You should also listen to Jethro Tull’s “A Passion Play” which was a favourite of Tim’s that he put me on to, and some early Gentle Giant though he confessed to me he liked some of their later stuff too… a line I could not cross personally.
Thank you Tim, and thank you to all those around him for looking after him all this time. Your music really did change my life in many ways.