If you’ve been building apps in Swift for a while, you’ve probably spent some time writing tests with XCTest . It’s been the default testing framework on Apple platforms for years, and while it does the job, it often feels… a little clunky. Now enter Swift Testing — a newer, more modern testing framework that’s part of the Swift open-source project. The difference is immediately noticeable. Writing tests with Swift Testing feels like writing Swift code, not fighting a bunch of boilerplate. Here are some of the reasons why many developers are starting to prefer Swift Testing over XCTest: 1. The Syntax Just Flows Better In XCTest, you’re constantly reaching for XCTAssertEqual , XCTAssertTrue , XCTAssertNil , and so on. Each one has its own function, and you need to remember which is which. In Swift Testing, you simply use #expect with plain Swift expressions: #expect(result == 42) Compare that to: XCTAssertEqual(result, 42) Not a huge difference in one line, but when you multiply ...
Long waiting is over. !! iOS 12 brings Autofill for OTP text field which is close to Android provided a decade back. Previously in iOS we used to toggle between OTP text screen and message inbox. Which was hard to remember and time consuming resulting a bad user experience. Personally, I have been asked from the client/customer couple of times to implement autocompletion for OTP field and took me a lot of time to convey that it is not possible in iOS. Why Autofill was not possible previously? We all know that Apple gives at most care for user privacy. When we see iOS architecture, each individual app is like a separate island. There is no inter-app bridge between apps (exception for Keychain and URLSchemes APIs which gives very limited scope). Thus we cannot read message content from inbox. Where to start Autofilling? First of all, the target SMS need to have the OTP Code with prefix string "Code" or "Passcode"on its message content. Beware of OTP c...