![]() ![]() ![]() Well apparently, testing against older MacOS versions. We were ready to release version 2.0.0 and enjoy the new codebase and functionality. So TmpDisk was working again, I had some basic UnitTests and had manually tested every app codepath. ObjectiveC NSArray *loginItemsArray = (NSArray*)CFBridgingRelease(LSSharedFileListCopySnapshot(loginItems, &seedValue)) I ended up rolling this myself but if you run into the same issue LaunchAtLogin has a ton of details and a package to help you with a launcher. The previous code to manually inject the app into the LoginItems array was deprecated and the new approach is to create a specific Launcher App. ![]() The second breaking change was how to get TmpDisk to launch on login. Quick plug, if you’re looking for a server to help manage your AppCast.xml and/or anonymously profile your App users, check out Sparkle Server - written in Rust with a small footprint and simplified admin management. Testing the Sparkle upgrade was painful since each test required a full binary deploy to production one Github and the sparkle server. This wasn’t terrible but I forgot to re-embed the DSA public key in the binary since the new instructions only show the EdDSA workflow and I had to quickly roll a new version. Since I no longer had the old developer account with Apple, the migration from DSA to EdDSA had to be done with an interim version supporting both signing methods. The first breaking change was having to migrate from the old Sparkle framework to the new one. I simplified the StatusBarController, moved away from global notifications to blocks and cleaned up the UI and added some extra functionality to the autocrat manager and got to add TmpFS support - which was what prompted the entire rewrite in the first place. That didn’t mean we couldn’t take advantage of taking 10+ years of coding experience to refactor the app. If I wanted to support those users with the new version then almost all the new Swift features like SwiftUI were off the table.įor the most part, the migration was a 1:1 code functionality replacement. Versionġ0.12 for example is MacOS Sierra - released in 2016 so an almost 6 year old OS at this point. Looking at the individual (anonymized) TmpDisk usage stats, you can see a very varied spread of OS versions. Pulling data on MacOS version marketshare was actually very hard, and I couldn’t find a reliable source of truth for the ecosystem in general. This post is a (mis)adventure in modernizing an ObjectiveC app in Swift.Įvery MacOS app needs to be targeted at a minimum OS version in order to take advantage of newer language and framework features. Since then the app has been essentially stable with no major feature requests or stability issues prompting the code-base to slowly deteriorate to the point it couldn't even be built on a modern MacOS system. Turns out I wasn’t the only one facing issues and TmpDisk took off, being featured in multiple magazine articles and spread across the web getting hundreds of thousands of downloads. TmpDisk was an app I built back in 2011 to solve an issue I had managing multiple RAM disks that helped with Grunt buildfile speed and cleanup. A journey porting TmpDisk from ObjectiveC to Swift ![]()
0 Comments
Leave a Reply. |