Use Swift's "withCheckedThrowingContinuation" to modernize your async code.
Anas Poovalloor’s Post
More Relevant Posts
-
Check out Natalia Panferova's article on how to surpass the limitations of basic string comparison method by leveraging specific functions within the Foundation framework. #iOS #iosdeveloper #iosdevelopment #swift #swiftlang
When comparing strings in Swift, converting to a common case can be unreliable with different languages. I just wrote about how compare(_:options:) and localizedStandardCompare(_:) from Foundation can offer a more accurate solution: https://lnkd.in/gCwYdzfx #SwiftLang #iOSDev #iOSDevelopment
Case insensitive string comparison in Swift
nilcoalescing.com
To view or add a comment, sign in
-
❤️🍉 Passionate Senior iOS Developer | Mobile S̵̗̉ẻ̵̲č̵̭ủ̵͇r̶͚̈́i̷̫͂t̵͓̚y̷͇̍ and Reliability Specialist
Are you allowing users to search in your app? If so, make sure you follow Natalia Panferova's tip from this post, or some of your localized users will have a less than ideal search result. Her example with "Strasse" is right to the point.
I wrote a short post about using localizedStandardRange(of:) in Swift for performing user-level search, making sure it's locale aware and behaves similar to how searches are done generally in the system: https://lnkd.in/gTzytXw9 #SwiftLang #iOSDev
User-level string search in Swift
nilcoalescing.com
To view or add a comment, sign in
-
iOS Developer (Swift, SwiftUI, UIKit, ARkit, Firebase) Creating Impactful Apps with Leading Brands | 4 Years of iOS Development Experience.
𝐒𝐰𝐢𝐟𝐭 𝟔 𝐀 𝐍𝐞𝐰 𝐄𝐫𝐚 𝐟𝐨𝐫 𝐢𝐎𝐒 𝐃𝐞𝐯𝐞𝐥𝐨𝐩𝐦𝐞𝐧𝐭. As we continue to witness rapid advancements in technology, the release of Swift 6 marks a significant milestone in the evolution of programming languages. Swift 6 brings a host of new features and improvements that promise to enhance the development experience, boost performance, and provide greater flexibility for developers. Let’s dive into the benefits and new features of Swift 6. 𝐁𝐞𝐧𝐞𝐟𝐢𝐭𝐬 𝐨𝐟 𝐒𝐰𝐢𝐟𝐭 𝟔 Complete Concurrency Enabled by Default: Swift 6 introduces complete concurrency checking by default, making it easier to write safe and efficient concurrent code. This change reduces the likelihood of data races and improves overall code reliability. 𝟏𝟐𝟖-𝐛𝐢𝐭 𝐈𝐧𝐭𝐞𝐠𝐞𝐫 𝐓𝐲𝐩𝐞𝐬:The introduction of 128-bit integer types provides better support for high-precision calculations and large data sets. 𝐀𝐝𝐯𝐚𝐧𝐜𝐞𝐝 𝐂𝐨𝐥𝐥𝐞𝐜𝐭𝐢𝐨𝐧 𝐎𝐩𝐞𝐫𝐚𝐭𝐢𝐨𝐧𝐬: Pack Iteration and Noncontiguous Collection Operations: Swift 6 adds new collection operations that enable more flexible and efficient data manipulation1. 𝐍𝐞𝐰 𝐅𝐞𝐚𝐭𝐮𝐫𝐞𝐬 𝐢𝐧 𝐒𝐰𝐢𝐟𝐭 𝟔 Swift 6 integrates new libraries like Swift Numerics and Algorithms, providing developers with powerful tools for scientific computing, machine learning, and more. Swift 6 focuses on providing a fantastic developer experience with features like faster builds, more informative diagnostics, responsive code completion, and a reliable debugging experience. I invite you to share your thoughts and experiences with Swift 6. How do you see these new features impacting your development workflow? Let’s continue the conversation in the comments below!
To view or add a comment, sign in
-
Essential Tips for Writing Clean Code with Swift
To view or add a comment, sign in
-
Want to write cleaner, more maintainable Swift code? 🤔 SOLID principles are your secret weapon! 🛡️ I've just published a new article on Medium diving deep into how to implement these fundamental OOP concepts in your Swift projects. Check it out and let me know your thoughts! 👇 https://lnkd.in/dX_muBcJ #Swift #SOLID #OOP #CleanCode #SoftwareDevelopment
Implementing SOLID Principles in Swift
medium.com
To view or add a comment, sign in
-
Here are 10 essential tips every Swift developer should know: 1. Optionals: Understand how to work with optionals effectively to handle values that might be absent. 2. Type Safety: Swift is a strongly typed language, so leverage its type system to catch errors at compile time. 3. Memory Management: Take advantage of ARC (Automatic Reference Counting) but be mindful of strong reference cycles. 4. Error Handling: Use Swift's error handling mechanisms (try, catch) to gracefully manage errors in your code. 5. Swift Standard Library: Familiarize yourself with the rich set of functionalities provided by the Swift standard library. 6. Closures: Master the use of closures for writing clean, expressive code, especially in asynchronous operations. 7. Concurrency: Understand Grand Central Dispatch (GCD) and Swift's concurrency model (async/await) for efficient multitasking. 8. Protocol-Oriented Programming: Embrace protocols and protocol extensions for code reuse and extensibility. 9. Value vs Reference Types: Differentiate between value types (structs, enums) and reference types (classes) and choose appropriately. 10. Debugging and Optimization: Utilize Xcode's debugging tools and Instruments to debug and optimize your Swift code for performance. These tips encompass foundational concepts and best practices that can help you become a proficient Swift developer. #BlockchainExperts #Python #Go #TechTalent #BookMyTalent #bmt #developer
To view or add a comment, sign in
-
Impressed this one Debugging Custom LLDB summaries with @DebugDescription Swift 6 provides a new debugging macro to easily customize how an object is displayed in LLDB when using the p command, and in the variables view in Xcode and VSCode, by using a formatting scheme that does not run arbitrary code. Types that conform to CustomDebugStringConvertible provide a debugDescription property that returns a string describing the object. In LLDB, the po command calls this computed property on an object. In contrast, the p command uses LLDB’s type summary formatters to directly format the object using its stored property values. https://lnkd.in/gybma-FC
Announcing Swift 6
swift.org
To view or add a comment, sign in
-
Data-race safety in the Swift 6 language mode is designed for incremental migration. You can address data-race safety issues in your projects module-by-module, and you can enable the compiler’s actor isolation and Sendable checking as warnings in the Swift 5 language mode, allowing you to assess your progress toward eliminating data races before turning on the Swift 6 language mode. Complete data-race safety checking can be enabled as warnings in the Swift 5 language mode using the -strict-concurrency compiler flag. 1. Using the Swift compiler To enable complete concurrency checking when running swift or swiftc directly at the command line, pass -strict-concurrency=complete: 2. Using SwiftPM In a SwiftPM command-line invocation -strict-concurrency=complete can be passed in a Swift package manager command-line invocation using the -Xswiftc flag: 3. In a SwiftPM package manifest To enable complete concurrency checking for a target in a Swift package using Swift 5.9 or Swift 5.10 tools, use SwiftSetting.enableExperimentalFeature in the Swift settings for the given target: When using Swift 6.0 tools or later, use SwiftSetting.enableUpcomingFeature in the Swift settings for a pre-Swift 6 language mode target: 4. Using Xcode To enable complete concurrency checking in an Xcode project, set the “Strict Concurrency Checking” setting to “Complete” in the Xcode build settings. Alternatively, you can set SWIFT_STRICT_CONCURRENCY to complete in an xcconfig file: #iosdeveloper #100daysofcode #codingdays #backenddeveloper #appdeveloper
To view or add a comment, sign in
-
🚀 Excited to dive into the Dry principle in Swift programming! 💻 The "Don't Repeat Yourself" principle emphasizes code efficiency and maintainability by reducing redundancy. In Swift, we achieve this through: 1️⃣ **Reusable Functions:** Create functions for repetitive tasks, promoting code reuse and readability. 2️⃣ **Extensions:** Extend existing types with additional functionality to avoid duplicating code. 3️⃣ **Generics:** Use generics to write flexible and reusable code that works with any type. 4️⃣ **Protocols and Protocol Extensions:** Define protocols to establish a common interface and extend functionality across multiple types. Implementing Dry in Swift leads to cleaner, more maintainable code that's easier to debug and scale. Let's embrace efficiency and write DRY code! #swiftprogramming #SoftwareDevelopment #DRYPrinciple 🚀📝
To view or add a comment, sign in
-
Swift Tip: Get a Clear Picture of Your Code with "dump" Are you a Swift developer? Let's talk about a helpful tool for understanding your code better: dump. What's dump? Think of dump as a special lens that gives you a detailed look at your Swift objects. It shows you everything about them, like their structure and values. How to Use dump? Using dump is easy. Just throw any Swift object into it, and it'll reveal all the details. Why Use dump? It helps you understand complex data in your code, even if it's nested. Perfect for when you need a closer look at what's happening inside your Swift objects. When to Bust Out dump? When a regular print isn't cutting it and you need more details. Whenever you're trying to figure out what's going on with your data. By using dump, you can shed light on the inner workings of your Swift code and debug with confidence. So, don't forget about dump next time you're puzzling over your Swift projects! #SwiftLang #Debugging #iOSDev #CodeExploration #ProgrammingTips #DeveloperTools #RemoteWork #TechSkills #SoftwareDevelopment #LearningSwift #SwiftDevelopment #CodeUnderstanding #CodingCommunity
To view or add a comment, sign in