Thursday at WWDC ends with the “Bash”. This year the band was Weezer. I’ve liked their music in the past, and they were enjoyable. I didn’t stay for the entire show, since I was tired after an incredibly long day of really good sessions. Oh yeah, and I was carrying my book bag, which was very very heavy by three hours of standing with it on my back.
So what were all the sessions about today? I started with a session on Data Flow with SwiftUI. This session talked about how you would use Combine and SwiftUI to make a highly reactive UI. The example was based on a WatchOS App.
Next I a went to the introduction session on Combine. This is Apple’s new framework which allows for asynchronous communications between data streams and UI elements. Basically, this is the Apple specific replacement for RXSwift. The basic idea is you have three kinds of objects – Publishers (which emit messages and data events), subscribers (which catch them and do things like update UI elements), and I believe the last one is observers (but I can’t find them mentioned in the docs – (https://developer.apple.com/documentation/combine ). These can transfer data via operators like .map. Last summer I had changed WastedTime to use RXSwift to do a similar process. I will be updating to Combine shortly.
At 11am, I went to a session on Testing in Xcode. Last year’s session was good, but this year was even more detailed, and I got more out of it based on the foundation from last year. One thing I really enjoy the fact that at WWDC the testing session was PACKED. Who says developers don’t want to test their code. As a developer, just because it compiles doesn’t mean that the work is done. Having a strong test plan, Unit Tests, UI Tests, Performance tests, and a continuous integration test setup makes for a much better experience with your App. Xcode has done a great job of building this into the tool and enhancing the capabilities every year.
After this I grabbed a very quick lunch in order to come back and listen to Dr. Ayanna Howard talk about Robotics and her work at JPL, NASA, Georgia Tech and now working with kids with disabilities. Her work on empathy and bias in robotics was fascinating. The most interesting part was a set of experiments that showed that people will trust a robot even when they shouldn’t. They would setup an experiment, where a robot brought the person into a room to take a test. During the test, they would set off a fire alarm, and when the person would open the door the hall would be filled with smoke. They would have the same robot direct the person on how to get out. But they would send the people to areas that were obviously wrong. Most people would trust the robot, even standing in a middle of a hallway as if it were the safe space. amazing!
After this I got sometime in the lab with the Siri intent team. I fixed a bug with Siri intents in Wasted Time and have a bit of a better understanding on Siri short cuts. We shall see.
The afternoon started with a more detailed look at Combine. The session used notificationCenter as the sample and he did hit on CoreDate but it seems that this is less of a major match right now. They referenced a “passthrough” type of processing for CoreData. Hope to learn more about this, as my new Holiday Card Tracker uses CoreData.
The session integrating with SwiftUI was about having a combination of SwiftUI and non-SwiftUI elements within the same app. Basically the idea is how to migrate your app or add SwiftUI to an existing app. I am thinking I should use this for my new App as a way of redoing the “getting started” flow. Perhaps this will allow me to add this feature while not breaking the basic flow. The idea that the DataModel exist outside of SwitfUI was brought up and again links SwiftUI and Combine in order to create the UI that you will want in your app. Using the @Bindable and and @ObjectBinding to connect your data model.. . And we use the $datavalue mapping to connect the data element to the @objectBinding.
I skipped the next session because I wanted to actually start working on the SwiftUI tutorials. This worked pretty well, but I ran into a few bugs. Check it out yourself over at – https://developer.apple.com/tutorials/swiftui/interfacing-with-uikit .
The final session of the day was Taking iPad App to the Mac and to the Next Level. This session really walked through a lot of the actual differences. The advice apple kept giving was if you want a good Mac app, first do a good iPad app, and that would make the mapping a lot easier. While this is great advice, they then showed a lot fo preprocessor command to check if you were on the Mac to execute certain code. This makes sense if you really want to take advantage of Mac unique functions, but seemed a bit jarring in the examples. Overall, the design of SwiftUI to enable this level of cross platform development is very promising. So between SwiftUI, Catalyst, Catalina, and Combine we will either see a resurgence of new Mac apps, or a migration of more Mac apps to the iPad. The settings for Xcode and integration into the Appstore was also exposed. Making it very easy to distribute your Mac (iPad) app via the store, or thru traditional methods.
The evening ended with the “Bash” … The food was good, the beer was cold, and the band was Weezer. After such a long day, I didn’t make it thru the entire show, as I had to walk back to my car (about a mile away) and then drive back to the hotel. But the crowd had a great time.