Swift rewrite of Brandsonic Web mobile for iOS

After working on it for over a year, the Swift rewrite of Brandsonic Web mobile for iOS is nearly ready for release. There are many reasons why I decided to do this rewrite. The original codebase of Brandsonic Web mobile for iOS is over 10 years old. It dated back to the iOS 4 and Xcode 3 days. It was becoming harder and harder to maintain. This was part of the reason for the infrequent updates. When I started Brandsonic Web, I wasn't as skilled with coding as I am now. While I am no expert now, I know a lot more than I did when I started Brandsonic Web 10 years ago. My lack of skill lead to a lot of poor programming practices with also made the codebase harder to maintain. The old version of Brandsonic Web mobile for iOS is based on the old UIWebView API, which was deprecated by Apple a number of years ago. It was replaced by a new API, WKWebView. This was the biggest reason for the rewrite. I attempted to transition the current version of Brandsonic Web mobile for iOS to WKWebView, but I didn't really have much luck. It never got to a point where I was satisfied with it. The WKWebView API is far better than the old API. It's less error prone and it renders web pages a lot better. As a result of the Swift version using the WKWebView API, Brandsonic Web mobile for iOS will render pages much better and there are far less errors than the original version. The initial release of the Swift version doesn't really have any new user facing features, it is nearly identical in functionally to the original version. You might notice some subtle differences. I did add back and forward gestures, which were not present in the original version. I also did not add the no internet connection message to this version, as I am handling errors in a different way. My goal with the initial version of the Swift rewrite was to make it function as close to the original version as possible. I plan to add major new features in future releases. I will also try to have more frequent updates, at least one a year. One feature I would have liked to add is the ability to set Brandsonic Web mobile for iOS as your default browser on iOS 14. In order to do this, you have to get a managed entitlement from Apple. There is no way they will give me this for a non-App Store app. If anyone knows if there's a way around this on a jailbroken device, let me know.

The Swift rewrite will be released as version 0.10. I did have to drop iOS 8 support, as some of the APIs I used require iOS 9.0 or later. It is being built with Xcode 11.3.1 and the iOS 13.2 SDK, as this is the newest version of Xcode I am currently able to run. That being said, I have not tested it on iOS 14, but it should work. There is a known issue with this release. Certain websites will stretch the web view above and below the top and bottom of the screen. This makes it so you can't access the very top and bottom of a page. It doesn't happen on most websites, only certain ones.

None of this would have been possible without Paul Hudson and his excellent 100 Days of Swift. I never would have learned Swift without it. I was struggling to learn Swift and 100 Days of Swift is what finally made it click for me. I feel that I have a better understanding of Swift than I ever did of Objective-C.

Comments

Popular posts from this blog

Fix for Brandsonic Web mobile for iOS 0.9.5

Small update for Brandsonic Web mobile for iOS and Brandsonic Web for Mac

Brandsonic Web mobile, Packix and Havoc