Some call us old school, some call us Objective-C experts － and we’re not easy to find. Now that Swift has matured enough to be the main language for iOS programming, new programmers usually don’t have enough experience with Objective-C, and they prefer to work in Swift.
Learn more about us here
This case study describes the refactoring of Wikipedia’s
WMFLocationManager class from Objective-C to Swift.
The Wikipedia native iOS app project was launched in 2013. Almost 7 years and 30,000 commits later, the project consists of more than 180,000 lines of code in various languages. The ratio between Swift and Objective-C code is roughly 2:1.
Because the whole app is open-sourced on GitHub, it’s an ideal candidate for showcasing a real-world Objective-C to Swift refactoring and cleanup.
We refactored Wikipedia’s
WMFLocationManager class from Objective-C to Swift. Here are some basic facts about the class:
When working on a project recently, I needed an easy solution for testing and debugging push notifications. So I wrote a Swift command-line tool allowing me to send notifications directly from the terminal: Lola. I’d like to share what I learned.
I’ll explain how to create a token for APNs and send notification from the terminal using Swift. This is not a step-by-step tutorial for full implementation. I’ll just be going over the most complicated part of the implementation process. If you want to look at the working code, you can check the terminal app lola.
Sending a notification is…
We Are World-Class Experts at Improving Existing iOS Codebases