Work Note: Stream for Mac

Brain in a jarWorked on Stream for Mac today since we’re celebrating our granddaughters birthday tomorrow, should be a super good time. Looking forward to it.

So, today when I started I had to fix a couple of outlets in my Mac NIB for the main window. How this got busted I’ll never know but it was and it caused the app to crash at startup. I do this so rarely that I forget how to do it, so it sucked to have to start off that way. Fixed. ✅

Next thing on the fix it list was a bug I’d introduced three weeks back. When I’d refresh the blog list using a pull to refresh on the iOS build or Cmd+R for the Mac build it would make all the network requests and tell the view controller to do its thing, however I messed up my view model when I added the ability to filter down to single blog selection in the UI, whoops! That was a simple fix. ✅

I decided, with the time I had left, to add some keyboard support. Doing a Cmd+A will now select all feeds. I need to add an All item in the blog list so folks can click on it if they’d prefer to select to display all feed items for all blogs that way. Maybe next time.

I also added support for using the up and down arrows to navigate through the list of blogs or the list of feed items. That went together pretty quickly and I really like the results. Done. ✅

I’m going to add some vi support to the keyboard to do some navigating as well as making the space bar scroll the through the article you’re viewing or moving on to the next item once you reach the bottom of an article. Stuff like this are kind of table stakes in existing feed readers. Future addition.

Until next weekend I’ll have some new features to play with on my Mac. I’m tempted to start a TestFlight but it’s still so early days. Reach out if you’d like to try it now. It may crash and misbehave but it’s kind of fun to play with, if you can tolerate it. 😄

Work Note: Stream for Mac

More work on Stream for Mac today.

I renamed some stuff because I had Feed and FeedItem used in various places. A Feed represents the Blog’s RSS Feed information. A FeedItem is a single entry from an RSS feed for a particular feed.

Those are accurate names in my opinion but just glancing at them can be confusing in their use in the code. So, what I did was rename the table view BlogListTableView and the view model for it BlogViewModel. I also added new classes for table views called BlogItemCellView and BlogItemTableCellView. It made things a lot easier for me to read and understand. The base models of Feed and FeedItem remain as they were.

I finally got around to filling in the left side table view of the three columns. This is a simple list of blogs. I also added a little code to allow me to filter the list of feed items based on the selected row in the blog list. Simple, expected, stuff.

After doing that I adjusted the blog cell and feed item cell to use a different font for the blog title and feed item title. They look a lot better now. I also added some padding around the outer edge to space things out so they’re not all jammed together.

The final task was fetching and caching the favicon for each blog. That’s where I wrapped up for the day.

I can now display a list of blogs. By default all feed items display in the middle column. When you select an individual blog the middle column displays just the items for that blog. I still have to add a new top level item to the blog list to allow you to select All items, but not today.

Image of Stream for Mac

Stream Work Note

Red sock.Today I worked on some refactoring so I could support another column in the Mac version of stream and I migrated away from my singleton instance of the database because it just felt gross.🤮

That removes the only singleton in the app and I feel a lot better about it.

I’m splitting some functionality out of a view model and putting it into a different view model to better support the third column Stream will now have.

Yes, I’m adding a feed column. Stream for Mac is the only version that will have that extra column because it feels natural for the “Big Dog” app to have it.

I still plan on keeping the app extremely simple and will provide a Timeline Mode that hides the feed column so it behaves just like the Stream we’re accustomed to.

More to come. Today was a lot of infrastructure work and rebuilding the iOS to make sure it still works as expected.

The Mac version is in a bit of a busted state because I ran out of time today. But I’ll get it fixed ASAP. 😃

Until next week, take ‘er easy.

Work Note: Stream for Mac

I decided to go with working on Stream for Mac today.

The feed item cell has been a complete mess for years, yes, you read that right. It’s been a complete wreck for years now. I kept on insisting I do all the work using AppKit.

Today that changed. I needed to make progress and even though my SwiftUI experience is very limited I was able to get the general layout working the way I’d like it. It’s not complete by any means but each UI element is displaying in the place I want it to (mostly) and the cell resizes properly, oh, and the date label/text remains pinned to the right side of the cell. That was a big issue with my AppKit NIB attempt.

Polish, polish, polish is the next course of business with the new cell. It needs spacing updates, text size fixes, color changes, highlighting support, keyboard support, so many things. But, now that it lays out the way I want I can move forward.

This is the first SwiftUI code introduced to the Stream codebase, which began life in 2018.

Stream Work Note

I’ve managed to kick nine builds of Stream out to beta testers. That’s the most I’ve ever done! I owe this all to the four hours of time I’ve reserved on Sunday morning for working on Stream. It’s been seven weeks of work. Like I said in my last Stream Work Note I’m overjoyed at having this time to focus work on Stream and, of course, have a really great Mocha while I do it. 😄

During my testing I noticed that the one new feature I’ve been adding to the app would fail when Stream was tiled with another app. That really stunk because otherwise it looked great to me! Today I managed to fix that outstanding critter and it feels really great!

I’ve had two other bug reports come in specifically for my iPad support — thanks Lucian and Sean!

Red sock.The first bug was occuring when you’d pick a feed to subscribe to. That porting of the code has been synchronous since day one. I figured why do it asynchronously when the UI was going to be blocked while I added the feed to your list and parsed it. Well, newer versions of iPadOS didn’t like that and the app would crash hard. Yikes! Can’t have that. I fixed that bug earlier in the week or maybe last week, I don’t remember, but it’s out of the way and now asynchronously updates the app, be it iOS or iPadOS.

The second bug was a bit more difficult to fix only because I couldn’t reproduce it. It turns out it was happening consistently on iPadOS 16.8.2. So, I added that simulator setup and kerpow! 💣 It happened right away. YAY! 🥳 It turns out I’ve been stacking two navigation controllers on top of each other since I added iPad support a few years back. DOH! The OS was just tolerating it so I didn’t know. Well, it looks like Apple decided it wouldn’t allow that any longer, and rightfully so! I fixed that issue yesterday.

This morning was spent fixing the tiling bug and it’s now done and a new TestFlight build it up. If everything goes well with that build it could be my final build before Tuesday’s Apple Awe Dropping event. 🤞🏼

Have I ever mentioned I’d love to work on Stream full time? I didn’t think so. 😄

Stream Work Note

I’ve been going to Grit, my favorite coffee shop, for the last six Sunday’s to work on Stream. It’s been really rewarding to spend the morning working on it. I typically work from around 8AM to noon, then grab Chipotle for my daughter and I and head back home.

That four hours of time has given me so much joy and recharges me for the week ahead. I cannot imagine how much better Stream could be if I were able to do this five days a week for five to eight hours a day! I might actually be able to make some real progress on the Mac version! 😱

Today I’ve managed to kick a beta build out the door. What I expect to release is version 1.6.0 as soon as Apple opens the door for glassified releases. Now, don’t expect much. Even with my four hours at a time to work on it I’m still very slow and the feature I’ve added isn’t glassy, at all. It’s something I’ve wanted to add for a very long time. It’s a feature meant to make things easier to subscribe to feeds. That’s all I’ll say about it for now.

What’s next?

Well, I had wanted to create an entire new view for adding and managing your subscriptions. I really need a nice way to populate the app your first time launching it and give you some great options when you pop open the Subscribe view controller. My plan is to create a nice set of hand picked feeds for users and, perhaps, add a set of recommended feeds using Apple’s built in LLM models. We’ll see at some point I hope! As long as I’m able to continue spending my Sunday mornings coding I think I’ll be able to achieve a lot on the app. I have a lot of features to add and bugs to fix! There are a lot of usability things I could do to improve the app and a few bugs I need to take care of.

Where’s the Mac version?

Brain in a jarThis is a tough one. And it’s only tough because I don’t know AppKit as well as I do UIKit. Yes, Stream is still 100% UIKit and the Mac parts I’ve done are all AppKit. I’m thinking I may do some new features in SwiftUI because I need the practice. I’ve never built anything with SwiftUI.

I’ve struggled to get layout on the Mac working the way I’d like. My table view cells look like crap and even with help from a dear friend — hi, Josh — I haven’t been able to get it right. It’s terribly frustrating and makes me want to jump out a window.🤣 Maybe SwiftUI will let me make those cells work on Mac?🤞🏼

Stream Work Note

I haven’t done a development work note in a long time.

I’ve started working on a new feature for Stream that required creating an App Group so I can share data.

I’ve added everything to my new Action Target and I have the code put together using existing classes, it was honestly pretty easy to do.

Brain in a jarNow comes the interesting bit. If I understand how an App Group works I am going to have to move my existing database to the group container so the extension will be able to access it?

If that’s not the case I’m sure someone will let me know. 😂

The thing I’ve never tried to do is open a SQLite database from two processes. Does that even work?

If it doesn’t work, things are gonna get very interesting.

I can always create a separate database just for the Action Extension that matches the structure of the main database and have the main app import it at a later time.

I’m hoping I’ll be able to open it from the main app and the extension and have it work as expected, but I’m not holding my breath.

Stream for Mac: Work Note

Brain in a jarI managed to work on Stream for Mac for a little while yesterday. I got a bit confused about how menus operate on the Mac — from a developer standpoint. I’m an old Windows developer of 20 years turned iOS developer in 2009 and now exploring the Mac and AppKit (yeah, I know, it’s old and busted now.) I got hung up on who “owns” the menu in a Mac App. I’d never had to think about it before, now I have a better understanding of how the Mac and first responder work.

I was kind of beating my head against the concept until our internet connection decided to stop working and I was kind of forced to walk away for a bit. That was intimately the key to figuring it out. I asked some questions on the Core Intuition Slack, using my phone, got some great answers to my noob questions, and read about menus and first responder in a book I have available in Kindle. The book I used was Programming Swift! Mac Apps 1 Swift 3 Edition by Nick Smith. I jumped to Chapter 8 Menus, Toolbars, and First Responder and that did the trick. I’m hoping I’ll be able to carve out some time today to put my newfound knowledge to use. 🤞🏼

I have other chores to take care of first. Hopefully they don’t take too long. Heh, they always take too long. 😂

Work Note: Reworking Arrgly - Day 2

I didn’t do much on day two. I did a very basic layout that displays the long URL copied to the Pasteboard and got the link off of the Pasteboard and placed it in a text field. The layout it nowhere near final.

Then I decided to get Chipotle for lunch and got really lazy afterward and didn’t do any additional work.

Screen Shot 2022 12 28 at 11 11 13 AM

Work Note: Reworking Arrgly - Day 1

Brain in a jarEven though I was pulled into work yesterday I managed to start the rebuild of Arrgly to use SwiftUI. I do NOT recommend doing this on a real software project because rewriting an app is a sure way to lose money and possibly destroy your business. I use Arrgly as a learning application because it’s tiny and fairly easy to rework.

Yesterday I spent the day reorganizing the Xcode project. It was organized into different folders to make it easier to find things. I had it organized in groups like; Network, ViewModels, Utility, Parsing, etc. All of those lived under the main Arrgly build target and I’d like to reuse all of that code for the SwiftUI build.

Step 1

I added a new build target for the SwiftUI project, called SquishU for Squish Universal. Oh, yes, I’m renaming the app to Squish because I really hate Arrgly and that’s the best I could come up with.

Step 2

Once I had the new target I created a group called Shared and moved all of the code that could be shared between the two targets under the Shared groug and made sure the application could still build and run.

So far, so good.

Next

Now I need to sit down and start reworking the UI using nothing but SwiftUI. This is where the rubber meets the road and who knows how long it’ll take me to actully complete the work.

With any luck this will be in the App Store soon. The last version of Arrgly was pulled from the store by Apple because I didn’t rebuild it with a newer version of the iOS Frameworks. It still works fine on my phone, you just can’t download it any longer.