Swift
92.7K views | +0 today

davdroman/PeriodDuration: The ISO 8601 period/duration types missing in Foundation

From github.com

The ISO 8601 period/duration types missing in Foundation - GitHub - davdroman/PeriodDuration: The ISO 8601 period/duration types missing in Foundation
No comment yet.

Use Live View in Swift Playground | Joohee Kim's Blog

From imjhk03.github.io

Recently I’ve been using Swift Playground app on iPad for studying Swift language. Personally, I think the playground app is one of the best apps for learning swift. While writing swift code is enough, there are sometimes to write UI related code. Here is how to use swift playground live view to show view.
No comment yet.

Value integrity in Swift. Reaching the limits of statically typed… | by Luis Recuenco | Sep, 2021 | Jobandtalent Engineering

From jobandtalent.engineering

I recently read the book Domain modeling made functional by Scott Wlaschin. Great book, highly recommend it. There is a whole chapter dedicated to integrity and consistency inside business domains…
No comment yet.

Hard-coded Tokens, Keys and Credentials in Mobile Apps

From www.netguru.com

Mobile applications are often viewed as secure storage by developers. They are not, you should never store sensitive keys hard-coded inside mobile app.
No comment yet.

Continuous Streaming With Combine

From www.linkedin.com

Combine is a powerful tool to deal with streams in IOS, it keeps streaming data until it either errors out or is told to finish. However in some cases, we do not want the streaming to end when something errors out, this article will show a way to achieve that.
No comment yet.

Stack View Changes In iOS 15

From useyourloaf.com

Apple made a subtle change to the stack view implementation in iOS 15 that might catch you out when deploying back to earlier iOS versions.
No comment yet.

Restricting Dynamic Type Sizes

From useyourloaf.com

In iOS 15 you can set limits on the minimum and maximum sizes of dynamic type.
No comment yet.

How to set custom CodingKey for the convertFromSnakeCase decoding strategy

From sarunw.com

The thing you should know before using the convertFromSnakeCase decoding strategy.
No comment yet.

Preventing Data Races Using Actors in Swift

From swiftsenpai.com

Learn how actors in Swift can help developers to identify data races during development time and prevent them from happening once and for all.
No comment yet.

Building Static Lists in SwiftUI - The Ultimate Guide to SwiftUI List Views - Part 1

From peterfriese.dev

List views are a staple of iOS UIs. Learn how SwiftUI makes implementing them super easy.
No comment yet.

View clipping in SwiftUI

From www.fivestars.blog

A quick tour on all the possible ways we can clip views in SwiftUI!
No comment yet.

How to define custom environment values in SwiftUI

From sarunw.com

It might not be obvious that we can create a custom environment value, but we can do that. The steps to create one are not as straightforward as we usually do, but it isn't hard if you know how to do it.
No comment yet.

Best Practices for Building Accessible Mobile Apps – Increment

From increment.com

Learn about developing mobile apps with an accessibility mindset and the strategies, best practices, and tools that can help software engineering teams create more accessible mobile products.
No comment yet.

Exploring SwiftUI map custom annotations

From kristaps.me

We [explored](https://kristaps.me/blog/swiftui-mapview/) the Mapview in SwiftUI a while back. This time we will look into creating custom map annotations, the limitations, and how to overcome some of them. Placing annotations on the map, like marking a specific place, is one of the most critical tasks when showing a map in our iOS applications.
No comment yet.

Swift Concurrency: An Introduction | by Pete Smith | Zendesk Engineering | Aug, 2021

From medium.com

The Swift concurrency roadmap was first outlined in a post to the Swift forums in October 2020, with its stated goal being to “make concurrent programming in Swift convenient, efficient, and safe”…
No comment yet.

Mastering FocusState property wrapper in SwiftUI

From swiftwithmajid.com

SwiftUI became very powerful during the last WWDC. We gained many new features, and one of them was a brand new FocusState property wrapper. FocusState property wrapper allows us to read and write the current focus position in the view hierarchy. This week we will learn how to manage focus in SwiftUI apps using FocusState property wrapper and focused view modifier.
No comment yet.

Every SwiftUI Environment Value explained

From www.fivestars.blog

A tour on the 50+ public environment values.
No comment yet.

Button Configuration in iOS 15

From useyourloaf.com

Apple gave buttons a big upgrade in iOS 15.
jerometonnelier:

Damn cool ❤️

No comment yet.

pointfreeco/swift-custom-dump: A collection of tools for debugging, diffing, and testing your application's data structures.

From github.com

A collection of tools for debugging, diffing, and testing your application's data structures. - GitHub - pointfreeco/swift-custom-dump: A collection of tools for debugging, diffing, and testing your application's data structures.
No comment yet.

Making Network Requests with Async/await in Swift

From swiftsenpai.com

Learn how to make network requests using async/await in Swift, and also find out what are the benefits it brings.
No comment yet.

Deprecating Workarounds

From www.basbroek.nl

A tip shared by Ole Begemann some time ago to check if your workarounds in Swift have been fixed has been super helpful. With Swift, the compiler helps you out a bunch — why not use that to make sure you check if certain bugs have been fixed in newer versions of the language or the operating system? Given the following workaround for an imaginary issue in iOS 14.4: func workaroundForIssue(_ string: String) -> String { // Oh noes; "hello" does not return "world" in iOS 14.4! if #available(iOS 14.4, *), string == "hello" { return "world" } else { return string } } We’d want to check if this issue has been fixed in iOS 14.5 or later: @available(iOS, deprecated: 14.5, message: """ If this returns 'world' as expected, please update the function to only include the workaround in those versions that require it. If the issue has not been resolved yet, please update the deprecated version to the next minor release. """) func workaroundForIssue(_ string: String) -> String { // Oh noes; "hello" does not return "world" in iOS 14.4! if #available(iOS 14.4, *), string == "hello" { return "world" } else { return string } } This will emit a compiler warning once you’d update to a version of Xcode that supports iOS 14.5 or later. … if it hasn’t yet been fixed in that new version, make sure to update the “deprecated” version, and don’t forget to update your Feedback either ;-) Assuming the issue was fixed in that newer version, update the function to only include the workaround in those versions that require it: func workaroundForIssue(_ string: String) -> String { if #available(iOS 14.5, *) { return string } else if #available(iOS 14.4, *), string == "hello" { // Oh noes; "hello" does not return "world" in iOS 14.4! return "world" } else { return string } } Oh, and as mentioned by Peter Steinberger, you’ll unfortunately not be able to use this trick as-is for Objective-C; you’d have to work around the issue in Swift, and expose that to Objective-C, which you may not always be able to (or want to) do.
No comment yet.

Handling links with SwiftUI's openURL

From www.fivestars.blog

A deep dive into the latest environment value!
No comment yet.