Custom subscripts in Swift allow you to write shortcuts to elements from collections or sequences and can be defined within classes, structures, and enumerations. You can use subscripts to set and retrieve values without exposing the inner details of a certain instance. An instance can define multiple subscripts and a subscript can have multiple input …
Search Results for: A00-282 Schulungsangebot 🍃 A00-282 Dumps 🆘 A00-282 Echte Fragen 🌕 ➥ www.itzert.com 🡄 ist die beste Webseite um den kostenlosen Download von ➤ A00-282 ⮘ zu erhalten 🛃A00-282 Tests
NSFetchedResultsController extension to observe relationship changes
Apple provides us with great classes like the NSFetchedResultsController to interact with Core Data databases in our apps. The API evolved over the years with additions like support for the new NSDiffableDataSource. However, there are still scenarios where the default API is not helping enough. At WeTransfer, we heavily make use of Core Data. All …
A weekly Swift Blog on Xcode and iOS Development
See all Recent Posts Swift Keywords Do you know how to use each keyword in Swift?Click on the keyword to learn more and explore code examples. actor associatedtype async @autoclosure available await break catch class continue defer @discardableResult @dynamicCallable @dynamicMemberLookup enum @escaping fileprivate for @globalActor guard infix isolated lazy @MainActor nonisolated optional postfix @propertyWrapper private …
Testing private methods and variables in Swift
Testing private methods and variables is often something we run into when writing tests for our applications. You could think that it’s needed to fully verify that your code is working as expected and it helps you to get to that 100% code coverage. If you’re new to unit testing in Swift, you might first …
How to mock Alamofire and URLSession requests in Swift
Mocking data requests that are triggered by either Alamofire or URLSession is something we all run into when we start writing tests for our networking layer. When writing tests, it’s important that we don’t actually run the requests so we don’t mess up our backend database with dummy data. Also, this allows us to run …
Creating a command line tool using the Swift Package Manager
A command-line tool can be very useful for automating common tasks to boost developer productivity. While developing iOS applications we often make use of command-line tools like Fastlane and CocoaPods but it’s less common to write your own command-line tools for daily use. The Swift Package Manager makes it a lot easier to create command-line …
Authentication with signed requests in Alamofire 5
With more than 30k stars on Github, you can tell that Alamofire is a popular framework to use for iOS and Mac projects. It makes network implementations easy to do and it makes certain hard things easier, like retrying a request, authentication layers, or certificate pinning. Alamofire 5 was released in February 2020 after being …
Unique values in Swift: Removing duplicates from an array
Removing duplicates to get unique values out of an array can be a common task to perform. Languages like Ruby have built-in methods like uniq but in Swift, we have to create such methods on our own. The standard library does not provide an easy method to do this. There’s a lot of ways to …
SwiftLee 2019 in review: Top Swift Development blog posts
You know it’s been a great year if you have the feeling that it went really fast. After looking back on 2018 last year it’s now time to do the same for 2019 and look ahead at what 2020 will bring. I’m amazed by the support throughout the year. I’ve met a lot of you …
No space left on device: Testing low storage scenarios
No space left on device is an error message that starts to show up more lately. Over the years, storage has grown from 1GB to 1TB but with technologies like iCloud, we can also see storage stopping at 64GB. On top of that, we’re making more content of higher quality that results in lower storage …