The final build of iOS 14.0 will be released soon, and it’s about time to make sure our apps are running great on iOS 14. This year Apple introduced major changes in UISplitViewController, which are mostly dedicated to a new three-column layout and a sidebar. While the new sidebar UI looks great, in this post I will only focus on changes to existing functionality that we already use in our apps and show what can go wrong when your existing app is run on iOS 14. With that said let’s dive in.
Probably the first thing that you’ll notice when looking at the UISplitViewController API exclusive to iOS 14 will be a new initializer that accepts UISplitViewController.Style as a single argument. While doubleColumn and tripleColumn styles are fairly self-explanatory, there is a third mysterious option called unspecified. After some testing, it became clear that unspecified style is a way to tell UIKit that you want iOS 13 behavior, so if you don’t want to deal right now with all the issues described next, you can enjoy the old behavior even when running on iOS 14, if you’ll use the unspecified style. The only issue with this scenario is that it is a bit tricky to set this specific style. Next, I’ll quickly summarize solutions that do and don’t work for such a task. …
iOS 13 brought quite a list of new features: SwiftUI, Combine, Dark Mode, RealityKit, iPad OS, etc. But several things were left almost unnoticed. Among them is a new appearance of some UIKit components. UISegmentedControl alongside with UISwitch, UIStepper, and UISlider got a new look.
Unfortunately, in the case of UISegmentedControl, those changes caused several issues which I describe next.
The “tintColor” property introduced in iOS 7 allowed to change the appearance of UISegmentedControl.
Starting with iOS 13 “tintColor” does nothing. No matter what color you will assign, the appearance of UISegmentedControl won’t change. To make things even more unintuitive, Apple did not mark this property as deprecated. To give us at least some way to customize colors of UISegmentedControl besides the “backgroundColor” Apple introduced a new property called “selectedSegmentTintColor”. …
This post has been updated to include the recent additions in Xcode 12 dedicated to In-App purchases testing.
One of the In-App purchases implementation steps that every developer eventually faces is a choice of a suitable purchase record persistence strategy which will make possible to give access to paid content after app relaunch.
The most obvious way of persisting the purchase is to store some value in
UserDefaults that will indicate whether or not some content has been unlocked. Such approach is shown in two tutorials at raywenderlich.com written by Owen Brown and Pietro Rea, where
UserDefaults are used to store a boolean flag to indicate non-consumable products purchase status as well as
Date instance to persist the subscription expiration date. Such a solution is often criticized due to lack of data integrity protection, as content present in
UserDefaults is stored as an ordinary binary plist in the Preferences folder of app's bundle and thus can be edited by the user using software like iMazing, iFunBox or iExplorer as shown by Andrés Ibañez in his 2014 post. …