Non-Selectable Rows in a SwiftUI Picker

With SwiftUI, it’s quite easy to create forms to collect user input. Consider the following.

struct ContentView: View {
    @State var numberOfCookies: Int?
    
    var body: some View {
        NavigationView {
            Form {
                Picker("How many cookies?", selection: $numberOfCookies) {
                    ForEach(1..<10) { number in
                        Text("\(number)")
                            .tag(number as Int?)
                    }
                }
            }
            .navigationTitle("Order")
        }
    }
}

Being in a Form in a NavigationView means our Picker above will navigate to a list on tap by default. We thus get a view that looks like this.

If they tap on the row, they’re shown this list of options.

The Picker will take each view generated in the ForEach and show it as an option.

This is super simple! However, what if we wanted to show some kind of header alongside our various options? Or perhaps we wanted to section the options? Or maybe we’re displaying options from a third-party API that includes such headers or section names in the returned data? To figure that out, let’s first understand how the SwiftUI picker works.

How Picker Works

The above code seems fairly straightforward. I defined a Picker in a hierarchy. It had a title that is displayed in the form. The selection was set as a binding to a local state variable. The trailing closure was my picker content, where I used a ForEach to generate each option.

However, as simple as that might be, you might be asking: What is with the tag?

Each view that is used in the Picker needs to be tagged with the value it represents. In our case, it’s just a number. So I am tagging each generated view so that it corresponds with a valid value.

But why didn’t I just say “.tag(number)“? It’s because it wouldn’t match the type the Picker is looking for, namely the optional Int of the state variable. If I had done that, the Picker would still show each of my numeric options, but none of them would be selectable. Tapping on one wouldn’t change the data source.

This leads to an interesting observation: Any view in the Picker that doesn’t have a tag matching the bound type is thus non-selectable.

Making Picker Headers

With this knowledge in mind, let’s go back to our example. Let’s say we wanted to show that we have a discount if the customer buys more than 4 cookies. How can we do it?

We change our picker like this.

Picker("How many cookies?", selection: $numberOfCookies) {
    Text("Normal Price")
        .font(.headline)
    
    ForEach(1..<5) { number in
        Text("\(number)")
            .tag(number as Int?)
    }
    
    Label("Discount", systemImage: "tag")
        .font(.headline)
    
    ForEach(5..<10) { number in
        Text("\(number)")
            .tag(number as Int?)
    }
}

We now have other views in our picker that are not tagged as options, thus becoming visible yet non-selectable display items. In the above code, we first display “Normal Price” before showing options for quantities up to 4. We then show a more complex view, a Label, before showing the other quantities.

Our view now looks like this.

And just like that, we have support for displaying non-selectable content within our picker.

iPad: Pushing the MacBook forward

Ever since the iPad came out, there has been a growing question: Will the iPad replace the MacBook? Over two years ago, I put together my thoughts just after the third generation iPad Pro was announced.

Quoting from my own post:

Everyone is expecting iPad to replace laptops at some point in the future. But what exactly are they wanting?

It seems the expectation is that, if iPad is the future of computing, that we’ll eventually not need laptops (and maybe desktops) because iPads will replace the PC category for what we do. Thus, iPads need to eventually do everything current PCs can do and more.

As the iPad has become more capable, it seems to move closer to replacing the laptop.

However, Apple has said that their goal is not to replace the laptop. In that post, I quoted Phil Schiller in a 60 Minutes interview:

Charlie Rose: Is there danger of one product cannibalizing the other product?

Phil Schiller: It’s not a danger, it’s almost by design. You need each of these products to try to fight for their space, their time with you. The iPhone has to become so great that you don’t know why you want an iPad. The iPad has to be so great that you don’t know why you why you want a notebook. The notebook has to be so great, you don’t know why you want a desktop. Each one’s job is to compete with the other ones.

Will the iPad rise to tear down the MacBook, replacing it as the portable computer in Apple’s line up? Schiller’s words seem to be a resounding no. This, however, leaves us in an interesting quandary.

Strong Competition

For years, many have seen the iPad gain new features and come closer to being a laptop replacement. For some, it already has, replacing cheap PC laptops (or even MacBook Airs) used for email and browsing. The addition of the Magic Keyboard has made that an even better option than before.

This year, though, we’re facing something that we haven’t seen yet: The iPad line is on par with the latest Mac’s processing capabilities.

In November, Apple announced their new line of Macs running their own Apple Silicon. The M1 chip, based on the A14 (found in iPhone 12 and the 4th generation iPad Air), has brought increased battery life and performance to Apple’s lower-end Macs. The A14X, likely closer in performance to the M1, is said to be coming in the soon-to-be-released iPad Pros.

If that is true, we’ve now got an interesting product line up. We have the iPad Pro which, when paired with the Magic Keyboard, gives you a touch-first interface in a slim package that also provides great support for cursor and keyboard input. On the other, we have the MacBook Air, giving you a cursor/indirect-input-first interface without touch, also in a relatively slim package. However, inside, they’re both virtually identical: Whether running an M1 or an A14X, both are just as powerful, just as capable, just as performant.

The differences are few: One has touch, one does not. One runs macOS, the other runs iPadOS (essentially iOS with a different name). And… that’s about it. Sure, you have some features like Spatial Audio or Face ID to consider, but those could easily come to a future M1X/M2 MacBook.

Schiller said, “Each one’s job is to compete with the other ones.”

At this point, we are looking at an iPad Pro that easily competes with and, in a few ways, exceeds the MacBook line.

What will Apple do: Let the iPad replace the MacBook portable? Or will Apple stick to what they’ve said all along and make the MacBook compete?

I’m hoping for the latter. If that ends up being true, Apple has some truly awesome MacBooks in their product pipeline. I can’t wait to see them.

Thought experiment on upcoming Apple Silicon Macs

I’m not one to put a lot of stock into rumors. Occasionally, though, one comes across that gets me thinking. This was one of them.

There’s a lot of speculation there. One of those items caught my eye, though.

A15 is aiming for 30% speed improvement.

Apple is known for having the fastest phones thanks to their own silicon. Their chip team is fantastic, making an A15 with a potential 30% speed improvement over the A14 quite likely.

What impact would this have on the Mac, though?

The M1

In November, Apple announced the first Macs with their own silicon. The M1, based on the A14 chip featured in the iPhone 12 series and the 4th generation iPad Air, quickly gained a reputation for amazing performance for the amount of power required. It scored the highest single-core score on Geekbench, and while it was beaten in multi-core, it was no slouch, either.

While the A14 has a 6 core architecture (2 performance cores, 4 efficiency cores), the M1 has an 8 core architecture. The additional 2 performance cores no doubt help bring up the M1’s multi-core score and help make the latest Macs truly fast machines.

The M1 has allowed Apple to take beloved Macs like the MacBook Air and simultaneously:

  • Increase CPU performance by up to 3.5x over the previous MacBook Air
  • Increase battery life by 50% (from 12 hours to 18 hours)
  • Remove the fan

The MacBook Pro got similar improvements:

  • Increase CPU performance by up to 2.8x over the previous MacBook Pro
  • Increase battery life by 100% (from 10 hours to 20 hours)

While retaining the fan, many users report hardly ever hearing the fan in a MacBook Pro, nor feeling excessive heat from the device, even under heavy workloads.

The (Theoretical) M2

With everything Apple could bring because of the M1, what could the M2 provide? Where can our speculation start?

I’m going to start with the rumor quoted above.

If we assume the M2 will be based on the A15 chip, and we take the 30% improvement as a finality with the A15, I think we could safely assume such performance increase would come to the M2.

According to Geekbench scores, the M1 scores approximately 1700 in single-core and 7100 in multi-core. Assuming a 30% increase for the M2, I would assume that takes the single core scores above 2000 (and potentially up to 2200). Geekbench browser shows Hackintoshes with AMD Ryzen 9 5950X at that range, but I would assume these are overclocked. Regarding multi-core, assuming a more modest 20% increase (though I don’t see why 30% wouldn’t be possible), that gets the M2 up to 8500.

And an M2X?

This theoretical M2 is with the same 8 core architecture in mind. What if Apple made the M2 more than 4 performance cores?

While you can’t really just multiply your multi-core score by the number of performance cores, I’m going to do that just as a thought exercise. How close could Apple be to having their own silicon out-perform even their most expensive Mac?

First, let’s look at the current high end Macs. The (recently discontinued) iMac Pro was configurable up to an 18 core Intel Xeon W-2191B configuration. Its multi-core score is around 13,300. The Mac Pro’s base configuration is a 12 core Intel Xeon W-3235 scoring at 12,000. The highest Mac Pro configuration, with a 28 core Intel Xeon W-3275M, maxes out at just above 19,000.

Naively assuming doubling our performance core count would double our multi-core score, an M2X with 8 performance cores could potentially have a score of 17,000. That easily out performs the iMac Pro and takes us into Mac Pro territory. Should going to 8 performance cores not double our multi-core score, however, I do think an M2X would still beat out the iMac Pro easily.

Whether or not we see a Mac Pro this year with Apple Silicon, I think Apple is easily on their way and will definitely complete their 2 year transition on schedule. By the time it’s done, I feel we will see the following configurations:

  • M# – 4 performance cores, 4 efficiency cores. Focused on the ‘lower end’ of the Mac spectrum (MacBook Air, Mac mini). Easily outperforming today’s Intel-based Mac portable line.
  • M#X – 8 performance cores, 4 efficiency cores. Used in the MacBook Pro and iMac lines. Potentially outperforming anything up to (and maybe including) today’s Intel-based Mac Pro.
  • M#Z (or some other identifier) – 12+ performance cores, 4 efficiency cores. Mac Pro option, providing amazing performance with less power consumption, easily replacing the current Mac Pro.

I was personally impressed with the M1 Macs that were announced. When it becomes time for me to get a Mac (likely with an M2), I know I will be thoroughly pleased with its performance. The Mac’s future is very bright at this point.

The “iOS device supporting the most OS releases” is…

Over four years ago, I wrote an article that talked about device longevity and support. I started by talking about the iPad 2.

In March 2011, Apple unveiled the iPad 2. It was thinner than the original iPad, included both a front and rear facing camera, and packed the Apple designed A5 chip. While not incredibly more powerful than iOS devices sold in the previous year, the iPad 2 currently holds an incredible distinction: it supported six iOS releases! Only now, five years after introduction, is Apple letting the A5-family go. It launched with iOS 4.3.5 and will end with iOS 9.3.5, the most current stable release of iOS.

Apple continues to support their devices longer than other smartphone or tablet manufacturers. The iPad 2 certainly wouldn’t come close to the performance of today’s iPads, but it had the power to support six iOS releases!

Something I also noted at the same time:

iOS 9 stands as a unique iOS release: it is the only first major iOS version to not drop support for a device. In other words, all iOS 8 capable devices were able to get iOS 9. Given these recent trends, it’s likely that a good number of iOS devices, especially the 64-bit ones running the A7 chip or newer, will be supported by iOS releases for years to come.

Since I first wrote that, we’ve seen two other iOS releases that also didn’t drop support for the previously supported devices.

  • iOS 12 supported all of the same devices as iOS 11, though the iPhone 5s and iPhone 6 had limited support due to lower RAM specs.
  • iPadOS 14 supported the same iPads as iPadOS 13. (iOS 13 dropped the A8-family of devices, while iPadOS 13 kept supporting the A8 equipped iPads, likely due to the increased RAM on those devices)

What’s the result of those OS releases on device support? The iPad 2 no longer has the crown for the most number of supported iOS releases. Other devices have since had that same distinction. (Specifically the iPhone 5s, iPad Air, and iPad mini 2 supporting iOS 7 through iOS 12). But there’s one that’s done even better:

The iPad Air 2!

The iPad Air 2 was released in 2014 and initially supported iOS 8.1. The A8X chip inside continues to handle recent updates, and the device current runs the lastest iPadOS version (14.4 as of writing). That means it has supported seven major OS releases!

If Apple is willing to have a tablet with the power of an A8X chip live for that long, how long could the devices we see now be useful? A phone or tablet isn’t made useless just because it stops getting updates. Even if we use it until it’s no longer supported, seven years is quite a long time between purchases.

Back to my iPad 2 thoughts:

That all said, I’m sure any iPad 2 owner can tell you: The device ran smoothest with iOS 4 and slowest with iOS 9. But given that each release adds new features of some kind, it’s only an eventuality that hardware cannot keep up with the software running on it. But to support major OS releases for six years is quite a lot, at least in the mobile space. Apple, thankfully, has the advantage of controlling both the hardware and software that goes into their devices, allowing them to tweak and manage every aspect. Because of the limited hardware options, it’s also easy for them to maintain support for older devices if need be.

Despite how people feel about Apple and their devices, there’s little people can say regarding device longevity and support. No one in the industry does what they do.

I’m now very curious how long the current generation of Apple’s devices and chips (especially the A14 and M1) will be supported.

Facebook’s App Privacy Label

Ben Lovejoy, 9to5Mac:

Apps have to show what data is used in what way — categorized by such things as third-party advertising and developer marketing. Some data is shown in more than one category, but it was easy enough to de-dupe them in the above apps. With Facebook Messenger, in contrast, the list is so long I have to list it in full.

Does anyone other than Facebook leech so much of our personal information?

PC World: Apple is so full of it

Gordon Mah Ung at PC World doesn’t believe Apple’s claims about the M1’s performance:

Let me just say it outloud, OK? Apple is full of it. I’m referring to Apple’s claim that its fanless, Arm-based MacBook Air is “faster than 98 percent of PC laptops.” Yes, you read that correctly: Apple officials literally claimed that the new MacBook Air using Apple’s custom M1 chip is faster than 98 percent of all PC laptops sold this year.

This is a totally reasonable point. After all, have Windows PCs running on ARM shown themselves as being stellar devices? Not so much.

But we’ve had benchmarks for the A14 for a month now. The iPhone 12 and iPad Air definitely smoke the Surface Pro X. Why would a custom Mac chip be expected to be inferior to that?

When Apple makes its claims, my guess is they are comparing the new M1 to Intel-based processors ranging from Atom to Celeron N to Core i3 and up, all with integrated graphics. But by not defining the word “performance,” all this becomes just pure marketing spin. And is it really fair to compare a $999 MacBook to one that costs $150? Because $150 PCs are included in the 98 percent of laptops sold.

Apple’s claim likely included all of the lower powered Intel offerings. Of course, looking up benchmarks for Atom, Celeron N, and Core i3 show these to be no challenge for 2020 devices. The two year old A12 matches or exceeds their performance, especially in single-core. But what about the beefier options?

Does that mean the new fanless MacBook Air is faster than, say, Asus’ stupidly fast Ryzen 4000 based, GeForce RTX 2060-based Zephyrus G14? Does it mean the MacBook Air is faster than Alienware’s updated Area 51M?
The answer, I’m going to guess is “no.” Not at all. Is it faster than the miniLED-based MSI Creator 17? Probably not, either.

The implication here is that Apple can out-perform the low powered Intel offerings but is far behind the powerful Windows laptops. “Could a fanless Mac with a low power chip truly be faster than these higher power, cooled systems?”

I tried to look up each of these and compare benchmarks.

Zephyrus G14 vs 2020 MacBook Air

Against the Zephyrus G14, the M1 blows it away in single-core performance. In terms of multi-core, it’s about even, with the M1 barely behind. The G14 is “stupidly fast”, he says? Guess that means the new MacBook Air and M1 are “stupidly fast”, too.

Area 51M vs 2020 MacBook Air

For this comparison, I used the 10-core option of the Area 51M. That seemed to give it a more substantial lead over the M1 in multi-core. Again, in single-core performance, the M1 takes the lead. And while not as fast in multi-core, I think it’s fair to again point out that the M1 is doing this in a fanless design starting at $999. Meanwhile, the Area 51M R2 is marketed as having “advanced cooling” and, for the 10-core model from Dell, can be purchased for $3,700. Did the Alienware win this one? I’d say it barely did, but at almost 4 times the cost. That’s telling.

MSI Creator 17 vs 2020 MacBook Air

The Creator 17 looks more like the G14. M1 wins single-core again. Multi-core is close. If you think the MSI Creator 17 is a fast machine, then again, the MacBook Air and M1 are going to easily match or outpace this (depending on whether your operations rely on single or multi core performance). And, like the Area 51M R2, the Creator 17 has a 3-fan design and starts at a more reasonable price of $1499.

So, is the M1 faster than 98% of laptops sold in the last 12 months? If it can closely match (or, in single-core, crush) these ‘top 3’ options, it likely is faster than any Intel offering with a lesser CPU. In which case, it’s not just marketing spin: Apple is telling the truth about the performance of the M1.

And this is all in a fanless design (it specs similarly in the Mac mini and 13-inch MacBook Pro, both which have a fan). When Apple starts churning out chips for the larger MacBook Pro, iMacs, or eventually the Mac Pro, these are going to embarrass the rest of Intel’s line.

Meanwhile, I don’t think that PC World article is going to age well.

AnandTech’s Look at the A14, and the Implications for Mac

While today was all about Macs with Apple Silicon, the M1 chip in those Macs is likely based on the A14. AnandTech today dove into the A14, found in the iPhone 12 and latest iPad Air:

In the overall mobile comparison, we can see that the new A14 has made robust progress in terms of increasing performance over the A13. Compared to the competition, Apple is well ahead of the pack – we’ll have to wait for next year’s Cortex-X1 devices to see the gap narrow again.

What’s also very important to note here is that Apple has achieved this all whilst remaining flat, or even lowering the power consumption of the new chip, notably reducing energy consumption for the same workloads.

One further note is the data of the A14’s small efficiency cores. This generation we saw a large microarchitectural boost on the part of these new cores which are now seeing 35% better performance versus last year’s A13 efficiency cores – all while further reducing energy consumption. I don’t know how the small cores will come into play on Apple’s “Apple Silicon” Mac designs, but they’re certainly still very performant and extremely efficient compared to other current contemporary Arm designs.

Apple chip team continues to lead. Increased performance without increasing power consumption is no small feat. And again, this is looking at the A14 in the iPhone 12. The M1 chip in the new Macs no doubt build on this, which is why those Macs can claim such performance increases while reporting almost double the battery life for operations with previous generation Macs.

The performance numbers of the A14 on this chart is relatively mind-blogging. If I were to release this data with the label of the A14 hidden, one would guess that the data-points came from some other x86 SKU from either AMD or Intel. The fact that the A14 currently competes with the very best top-performance designs that the x86 vendors have on the market today is just an astonishing feat.

In the overall SPEC2006 chart, the A14 is performing absolutely fantastic, taking the lead in absolute performance only falling short of AMD’s recent Ryzen 5000 series.

The fact that Apple is able to achieve this in a total device power consumption of 5W including the SoC, DRAM, and regulators, versus +21W (1185G7) and 49W (5950X) package power figures, without DRAM or regulation, is absolutely mind-blowing.

One thing I love with AnandTech are their charts. Their benchmarks of the A14 against typical PC silicon are amazing to see. And Apple is doing that with a chip that uses a fraction of the power. If Apple were to scale their designs into something that did use 20+ Watts, you can imagine how it would handle such benchmarks.

Performance improvements, Apple in gray, Intel in blue. It’s no surprise that Apple chose this time to move Macs to their own silicon

Whilst in the past 5 years Intel has managed to increase their best single-thread performance by about 28%, Apple has managed to improve their designs by 198%, or 2.98x (let’s call it 3x) the performance of the Apple A9 of late 2015.

Apple’s performance trajectory and unquestioned execution over these years is what has made Apple Silicon a reality today. Anybody looking at the absurdness of that graph will realise that there simply was no other choice but for Apple to ditch Intel and x86 in favour of their own in-house microarchitecture – staying par for the course would have meant stagnation and worse consumer products.

Today’s announcements only covered Apple’s laptop-class Apple Silicon, whilst we don’t know the details at time of writing as to what Apple will be presenting, Apple’s enormous power efficiency advantage means that the new chip will be able to offer either vastly increased battery life, and/or, vastly increased performance, compared to the current Intel MacBook line-up.

Apple has claimed that they will completely transition their whole consumer line-up to Apple Silicon within two years, which is an indicator that we’ll be seeing a high-TDP many-core design to power a future Mac Pro. If the company is able to continue on their current performance trajectory, it will look extremely impressive.

The future of the Mac is exciting.

Apple claims the M1 to be the fastest CPU in the world. Given our data on the A14, beating all of Intel’s designs, and just falling short of AMD’s newest 5950X Zen3 – a higher clocked Firestorm above 3GHz, the 50% larger L2 cache, and an unleashed TDP, we can certainly believe Apple and the M1 to be able to achieve that claim.

Speculation on Apple Silicon in upcoming Macs

Ever since WWDC, we’ve been eagerly awaiting Apple’s first Macs running on Apple Silicon. Will they be drastically redesigned? How well will Apple Silicon Macs perform?

Along with announcing the transition in June, Apple provided a Developer Transition Kit to help developers prepare for building their apps for the new architecture. It was provided as a Mac mini enclosure running an A12Z chip, the same in the latest iPad Pro models. While (presumably) designed just for the iPad, the chip worked well enough to run macOS Big Sur. From developer chatter on Twitter, it seems to run fairly well. The benchmarks were decent, outperforming the MacBook Air in a device that isn’t intended to showcase the power of Apple’s Mac-intended silicon.

Apple builds a lot of custom silicon. Even the S-series chips used in the Apple Watch are based on A-series designs. Might this basis allow for a clearer understanding of macOS support on Macs?

This morning, a post by MacRumors shared information about an iMac coming in 2021 running an “A14T” chip. If true, what might this mean for Macs on Apple Silicon? While we are less than a month away from knowing details about the first available Macs with Apple Silicon, here are some thoughts I have.

Stronger Tie to iOS Devices

When Apple announces a new version of iOS, by announcing the devices that support it, they also clearly signal what devices can’t. Occasionally, a release will drop support for one or more devices, typically devices with the same chipset. For instance, iOS 11 dropped support for the A6, and iOS 13 dropped the A7 (and devices with 1GB of RAM running on an A8). If Mac chips are based on A-series designs, we may see similar drop offs with devices. Instead of saying an OS release requires Macs from some year and up, they could just say Macs with a particular chip.

With this change, I also suspect that we will see Macs and iOS devices from a particular year, running on the same chip, to lose new OS support at the same time. For instance, should iOS 20 drop support for the A14 (announced this year in the iPad Air 4 and iPhone 12), the macOS release of that year could also drop support for the Macs running the Mac-equivalent chip.

Now, why would that happen? Why can’t Macs, with higher specs, support OS releases for longer? They technically could. But I think one thing to consider is a big feature of running Big Sur on Apple Silicon: Running iOS and iPadOS apps natively on a Mac. When an iOS app is built with a minimum supported version of iOS 14, for example, the Apple Silicon Mac must also support the APIs required to run that app. That means a stronger tie between macOS and iOS. It also implies a strong connection between the hardware.

Apple devices already are known for incredible support when it comes to OS updates. No other manufacturer ensures their smartphones get as many major releases as iPhone. And this isn’t anything new. Even the second generation iPad supported 6 major versions of iOS during its lifetime! Right now, the average for iOS devices seems to be between 5 and 6 years. However, macOS Big Sur is available for some Macs that are 7 years old. So, I see this tighter relationship between Macs and iOS devices to culminate in one of two changes:

  • Macs start supporting only 5-6 major OS releases, in line with iOS/iPadOS devices – I don’t see this as likely, as Apple would not want to be seen as reducing support of their most expensive computing product line. Then people might say, “When it ran Intel, they would support 7 year old Macs. Now they barely can last 5 years!” I think Apple would want to show that their Macs have better support on Apple Silicon than Intel.
  • iOS/iPadOS devices start supporting OS releases for more than 6 years – Should macOS stay at supporting Macs that are 7-8 years old, perhaps one day we’ll have an iOS device that can be said to have supported 7-8 major OS releases now. They support 5-6 now, and the A14 in this year’s products is so far ahead of the A8 and A9 currently supported at the low end with iOS 14 that I can see it easily lasting to iOS 21, 22, or beyond.

Performance vs Battery Life

Already, Apple is comfortable with making variants of their chips for different products. This has been true ever since the A5X in the third generation iPad. Apple continues that trend to this day, with the iPad Pros running the A12Z (virtually identical to the A12X, with one additional core). These improvements typically are for the benefit of the iPad while retaining great battery life.

General expectations are that Macs running on Apple Silicon will have better battery life and better performance than their Intel counterparts. How will that be delivered?

I’m curious if we’ll see trade-offs made between the portable and desktop lines. For instance, perhaps we would find the A14T (the rumored Mac chip) in both the MacBook Pro and iMac. This chip might be the Mac-specific version of the A14, given additional cores to power what people expect from a Mac. It may even be an offshoot of the A14X (if one such chip launches later this year). So you would see an A14, A14X with improved graphics, and A14T with additional changes for the Mac.

This same chip might be able to scale across Apple’s entire Mac line. On the MacBook Pro, it would be tuned for better battery life with moderate performance. But for the desktop, with constant power and better cooling, it might be tuned for higher performance. Pair it with additional RAM and Apple’s custom GPUs, and you’d have a singular chip to track for Apple’s Macs during any given generation. Gone would be the days of choosing to buy a new MacBook with an i3, i5, or i7 processor. Instead, you’re buying a Mac with an A14T. You just are choosing how it’s tuned.

Is this how it’ll all turn out? Again, we will have to wait and see. But however it ends up, I’m excited to see what this new generation of Mac will bring.

Future App Development on iPad

With less than 24 hours until Apple unveils iOS 14 and a slew of software updates at WWDC 2020, I wanted to briefly get my thoughts down regarding something that has been in my head.

Many feel that, with the iPad positioned as a computing platform, the iPad itself needs to do more things like a Mac can. One of those is app development. While it’s not a totally useless platform for development, there are limitations. But I think there will be some lingering limitations for a while, and in a way, those limitations might help us see the direction Apple is taking their platforms.

Current State

Right now, the iPad has a limited availability for development. This is in the form of the Swift Playgrounds app, which is a great way to learn Swift within a playground environment. Since last year, it has supported SwiftUI, Apple’s new declarative UI framework.

Swift Playgrounds is useful but comes with some obvious limitations:

  • No actual app creation
  • IDE only – No Interface Builder/SwiftUI Preview canvas
  • Missing some SwiftUI functionality when running your code

It’s not totally useless. If you’re a fan of playgrounds like me, then you may already be used to building a lot of Xcode playgrounds to test various ideas and concepts. Doing the same on the iPad is no different.

iPad as ARM Mac?

With Apple’s rumored transition to ARM processors for their Mac line, some were speculating that the iPad Pro would be a good test device until actual ARM Macs ship later this year. However, this was shot down as the iPad Pro has only 6 GB of RAM, while the typical Mac starts with 8 GB.

From John Gruber at Daring Fireball:

iPad Pros only have 6 GB of RAM — no Mac has shipped with less than 8 GB in many years, and developers aren’t buying machines with 8 GB of RAM. Honestly, I think the RAM is a deal-breaker on the iPad Pro-as-ARM-Mac-dev-kit idea.

I also agree with this point. I don’t think the iPad Pro is itself a good candidate for testing macOS on ARM hardware. However, if we take the above limitation into account, let’s reason on some possibilities.

The Future of iPadOS

Why did Apple break out iPadOS from iOS? Sure, there are differences at the UI/UX level. For instance, you can drag and drop items between apps on the iPad, but on the iPhone this is limited to within the scope of a single app.

Even during the iOS 13 timeframe, the builds for iOS and iPadOS were similar in terms of foundation. There’s no surprise there. But this begs the question: is iPadOS just a marketing term?

With the recent release of the Magic Keyboard for the iPad Pro, I wonder if we’ll truly see the iPad move into more of a Mac-like direction. It will never become the Mac. It will never replace the Mac. But we might see some additions to the iPad that make it more compelling to use with something like the Magic Keyboard.

For one, let’s consider the initial transition in bringing iOS apps to the Mac. This was done by bringing UIKit from iOS to macOS. Last year, Apple announced Mac Catalyst as a way for iPad apps to easily come to the Mac, and improvements were made throughout iPadOS 13 to support mouse cursors and keyboard input.

The next stage in that transition is supposedly bringing support for iPhone apps to the Mac.

But that sounds so trivial. Why is that a separate stage in the release? If someone can easily make an app that supports iPhone and iPad now, what does this bring for developers?

iPadOS Windows

Last year, Apple added support for multiple windows (called “Scenes”) of the same app to exist at the same time. What this means is you can have two windows from the same app side by side in multitasking. Or have multiple windows from an app paired with multiple other apps. Example: You can have two Notes windows side by side, or two Messages windows, or two Safari windows.

However, there are still limitations on how windows can be arranged. Right now, you can have an app (or two, paired) take up the full display, and have an app visible via Slide-Over on the side.

What if the idea of iPhone apps coming to Mac is really intended for iPhone apps to come to the iPad? Imagine Slide-Over but refined and expanded, allowing iPhone-sized apps to live on your iPad screen, perhaps even when you’re on the home screen. With cursor and keyboard support, this would bring some added capabilities to iPadOS, bringing it closer to the Mac without actually running macOS.

I have no knowledge of future roadmaps, but I wouldn’t be surprised if that’s the direction iPadOS takes.

Now, what does this have to do with developing apps on the iPad?

The Future of App Development on iPad

Right now, app development is done on the Mac. Xcode lets you build apps for iOS, watchOS, iPadOS, tvOS, and macOS. And the Mac can simulate all of those environments.

If we were to expand iPad to be able to develop apps, we have to ask the question: What platforms can we simulate on an iPad?

If iPhone apps will soon be able to run on an iPad, I’d argue that being able to develop iPhone apps on an iPad version of Xcode is a possibility. And much like the Xcode for Mac is capable of building Mac apps, Xcode for iPad will be able to build iPad apps. In fact, I can see Watch and tvOS apps just as easily.

But what about Mac apps? While it could be possible, how would you test it? Mac apps have the most access to their platform than any other Apple OS, by far. Would you simulate a Mac environment to test a Mac app?

While not impossible, I find it highly improbable that you would be able to simulate a Mac environment on an iPad to test a Mac app.

Then you have the question of UI development. While you can programmatically build UI, Apple wouldn’t want to leave that as the only way to do so. And while many apps are still built with UIKit/AppKit and Interface Builder, Apple has showed us a new way to build UIs: SwiftUI.

With SwiftUI, we’re able to build apps for all of Apple’s platforms (including the Mac). With SwiftUI, I also think Apple is slowly laying the foundation for eventually supporting a version of Xcode for iPad.

While the iPad won’t be able to build everything Xcode for Mac can, it’ll eventually be able to build apps for the iPad, iPhone, Apple Watch, and possibly tvOS. But you would have limitations: SwiftUI would be your only route for UI.

If this ends up being true, it also shows Apple’s priorities: Enable developers to build apps for their more popular platforms with limited, more specialized tools, and leave the larger development picture to the Mac.

So will Xcode come to the iPad? I think so. Will it replace Xcode for Mac? No. Will the iPad replace the Mac? No.

But what we will definitely see is a separation of iOS and iPadOS. Last year was just marketing. This year and beyond, we’ll see it in practice.

WWDC 2020 Expectations

Everyone has their own expectations when WWDC comes around. Here is what I’d like to see come from Apple and their various platforms.

SwiftUI improvements

Whether they call it SwiftUI 2, or just say they’ve made it better, I fully expect to see a “What’s New in SwiftUI” session this year, including some much needed additions. Of those, I’m hoping to see:

  • First party support for two-dimensional data grids. If List is to UITableView, then I want whatever is the equivalent of UICollectionView. There are a few interesting third-party solutions out there, and I’m not against using them, but I feel something like this would benefit from being provided by Apple themselves.
  • Fixed TabView. Right now, while you can easily create tabbed navigation, the SwiftUI TabView doesn’t behave like a normal UITabViewController. Specifically, if you navigate to another tab and come back, it’s up to the developer to maintain the hierarchy. So if I’m 3 views deep in tab 1, go to tab 2, then go back to tab 1, I’m back at the root by default.
  • Fixed NavigationView. This is more-so when it comes to master/detail on iPad. If I navigate a layer deep in a detail, then rotate the iPad, it resets the detail view while retaining the navigation stack. So I can push a view, rotate, push again, rotate, push again, and end up with what seems to be a navigation stack three or four views deep when in reality my hierarchy is just one or two.

What I do not expect to see is a complete replacement of everything available in UIKit or AppKit. What I mean: I don’t think we’ll see SwiftUI versions of WKWebView, MKMapView, or similar views. The current SwiftUI<->UIKit/AppKit functionality seems to cover situations like this.

“Swifty” Core Data

In Swift 3, Swift gained a huge improvement when it came to JSON Serialization: Codable. Codable is really two protocols: Encodable and Decodable. But together, they take the concept of serializing data, such as to/from JSON, and made is super easy to support.

I would love to see something similar done with Swift classes and Core Data. Could we make a data model conform for Core Data storage by just adding a protocol conformance? If that were possible, I know I’d love to use it.

I’d also hope that any such improvements would allow us to make a Core Data managed object that automatically conformed to Codable without requiring a custom init/decoder.

A Gamer’s GameCenter

I think GameCenter was one of Apple’s squandered opportunities. They offer a powerful Apple TV box that, if powered by newer iOS chipsets, can rival console performance. Yet they have nothing on their platform that resembles the social interactions and networking like you’d see on Xbox or Playstation. I keep hoping they’ll wisen up, revive that platform, and provide a better way for people to find their friends and game together.

An Improved Development Experience on iPad

Swift Playgrounds shows that it’s possible to do coding on the iPad. I’d like to see this turned up a notch, even if it isn’t a full-blown Xcode for iPad. With SwiftUI, perhaps we’ll see some middle-ground. Use your iPad to develop a SwiftUI app? Great. Want to integrate legacy components? Take your project to your Mac.

Even if that doesn’t happen, I’m curious to see what new features and enhancements come to the Swift Playgrounds app this year.

I’m sure that, with whatever Apple announces, I’ll be eager to install the latest betas and try things out. Even if none of my expectations are meant, I’m going to enjoy WWDC 2020.