Welcome to another issue!
I received 113 emails last week regarding the upcoming iOS dev jobs newsletter. Lots of great ideas, thoughts, tips, and insights. Thank you! 🙏
I got this sense that many devs expect a lot of features, customizations and at the same time don't want to pay a penny. It was even suggested that I have a call with each company looking for developers and then write descriptions for each ad.
After some consideration, newsletter will still be paid. Besides having a custom offers, it will help developers prepare for interviews and improve their CVs.
I expect to launch it in mid May. I will keep you posted! 🤞
I appreciate your help and let's dive into this week's news! 👇
Subscribe to another newsletter I run!
3450 subscribers already! 🚀
Weekly newsletter featuring the best tools for iOS developers. Subscribe if you like @iOS developers
Sponsored Link
Explore Innovation at Pragma Conference 2024
Step into the future of Apple tech at Pragma Conference 2024, happening October 29-30 in Verona, Italy!
Get ready for a full day of deep-dive workshops followed by two days jam-packed with sessions and awesome networking. This is THE event for Apple developers — you won't want to miss it!
Swift Around the Web
Swift 6 upgrade preparation
Swift 6 is coming, bringing stricter concurrency checks and exciting new features. This post helps you prepare your projects and packages for a smooth transition.
Key Points:
- No official migration guide yet, but this post highlights potential changes (like Strict Concurrency).
- Focus on Strict Concurrency: Most refactoring will likely involve making your code concurrency-safe with Sendable.
- Upcoming language features like ConciseMagicFile are available for early use.
- Prepare Xcode projects by enabling Swift Concurrency Checking.
- Prepare Swift packages for upcoming features using -enable-upcoming-feature flag.
- Migration tips: Utilize Xcode fix-its and explore features with tools like Ole Begemann's script (linked in the original blog post).
By following these steps, you can get your codebase ready for Swift 6 and its benefits without major disruptions.
How one line of code led to +50% faster Swift compilation for tens of thousands of teams
This article details an unexpected benefit of open-source contribution. The author optimized mock generation for his company by making changes to open-source libraries (Sourcery and SwiftyMocky). These changes ended up benefiting tens of thousands of other teams as well.
Here's a breakdown of the key points:
- Optimizing mock generation in their iOS project led to a desire for faster Sourcery execution.
- Contributing to Sourcery's open-source codebase unlocked faster execution through changes to how templates are processed.
- The impact went beyond Qonto, improving Sourcery for countless other users.
- The article emphasizes the value of open-source contribution and highlights positive externalities.
Overall, this story showcases how open-source contributions can have a surprisingly broad and positive impact.
Coding
Integrating SwiftUI views into existing UIKit application — SwiftUI
This post explains how to seamlessly integrate modern SwiftUI views into your existing UIKit project.
Key Points:
- Use UIHostingController to bridge SwiftUI and UIKit.
- Embed SwiftUI views as full screens, subviews, or within specific containers.
- Enjoy benefits like unified UI development, code reuse, and modern UI features.
- Be aware of compatibility limitations, potential complexity, and performance considerations.
This approach lets you gradually modernize your app's UI with SwiftUI while leveraging your existing UIKit codebase.
SwiftUI: Dropdown Menu 3 ways (Picker, Menu, and Custom)
This article explores creating dropdown menus in SwiftUI. It covers three built-in options (Picker and Menu) along with their limitations for customization.
For more control over the look and feel, the author dives into building a custom dropdown menu from scratch.
This custom solution allows features like:
- Specifying menu width and button height
- Limiting the number of displayed items with scrolling for longer lists
- Highlighting the selected item
The article concludes with usage examples and how to show the dropdown menu at the top instead of the bottom.
Number Text Animation in SwiftUI with contentTransition
This blog post explains how to create smooth animations for changing numbers in your SwiftUI apps. It's especially useful for situations like countdowns where the numbers update dynamically.
It uses a SwiftUI feature called contentTransition. This modifier lets you define custom transitions for a view's content, allowing for creative animations when the content changes.
The blog post walks you through the steps to achieve this effect:
- Create a variable that will hold the number that you want to animate.
- When you update the variable's value, use animation to smoothly transition between the old and new numbers.
- Add the .contentTransition(.numericText()) modifier to the Text view that displays your number. This tells SwiftUI to use a special animation specifically designed for numbers.
With these steps, you can create visually appealing and engaging number animations in your SwiftUI apps, enhancing the user experience.
Design
Making things glow and shine with SwiftUI
This article explores creating a glowing effect in SwiftUI. It achieves this by layering a blurred shape on top of a base shape with a stroke.
Here are the key steps involved:
- Creating a base shape with a stroke using Shape.stroke.
- Adding a blurred glow effect on top using another shape with stroke and blur modifiers.
- Animating the visibility of the path segment using the trim modifier. The animation progress determines the values passed to trim for the beginning and end of the visible section.
- Implementing the Animatable protocol to allow animation of intermediate values.
- Creating a continuous loop animation by manipulating the formulas used to calculate the trim values based on the animation progress.
The post concludes with an example of using this technique to create a continuously glowing, two-segment animation similar to the one seen in a timer animation.
SwiftUI: Slide to unlock button
Imagine a button that locks your app, and users need to slide a bar to unlock it. This SwiftUI post shows you how to build this button step-by-step.
The guide takes us step-by-step. First, they create two parts: a background with arrows and a bar to slide. The bar animates smoothly as we slide it, showing different stages like "locked" and "unlocked" with icons.
To make this button super versatile, the post shows how we can customize it. We can change the starting and ending images (like a lock turning into an unlocked padlock). We can even choose if users slide left or right to unlock! Finally, the guide offers tips to fine-tune the animation for a satisfying user experience.
Other Cool Stuff
Master the reduce operator in Swift and make your code more performant
This post dives into reduce operator, a powerful tool for combining elements of an array or sequence into a single value. It simplifies tasks like finding sums, filtering data, and creating dictionaries.
The key benefit is it reduces code with better performance. The post explains two ways to use reduce:
- Reduce with Initial Result: Great for calculations like summing an array of numbers.
- Reduce into Initial Result: Efficient for transforming data, like converting an array into a dictionary for faster lookups.
With clear examples, the post demonstrates how reduce can streamline your code and improve app performance.
Making your custom font support dynamic font sizes
Normally, custom fonts wouldn't automatically adjust for users who prefer larger text. This post shows a neat trick: using the relativeTo parameter when setting the font size. This lets the font scale with the user's Dynamic Type setting.
But there's more! To keep your code clean, the guide also suggests creating a separate class to store your custom font properties. This makes your code easier to manage, especially if you have different font sizes and weights.
Overall, this guide helps you make your app more accessible and user-friendly by ensuring your custom font works seamlessly with Dynamic Type.
Xcode keyboard shortcuts to be more productive
This blog post explores 10 of the author's favorite keyboard shortcuts to boost your productivity in Xcode.
These shortcuts cover essential actions like running the app, navigating between files, searching for code, and manipulating the Xcode interface
Whether you're a seasoned developer or just starting out with Xcode, this list provides handy tips to streamline your workflow and save you valuable time.
In Case You Missed It
Make your iOS app smaller with Dynamic Frameworks
This blog post is for developers who want to reduce the size of their apps. It shows a technique where you can separate the code and images used by your app into different parts. This way, you avoid duplicating the same information in multiple places, leading to a smaller overall app size.
The post explains how to achieve this separation using dynamic frameworks for code and a separate framework for assets. While there are some additional steps involved in setting this up, the benefits can be significant. In the example provided, the app size was reduced by a whopping 58%!
It's important to note that this approach might have a minor impact on how quickly your app launches. However, the size reduction is usually the bigger advantage. Overall, this is a valuable technique for developers who are looking to optimize their iOS apps for users with limited storage space.
Generate and read analytics reports from the App Store Connect API
Apple recently released a ton of new data for app developers in App Store Connect reports. This data can be incredibly valuable for understanding how your app is performing. However, accessing this data isn't as simple as clicking a button.
This blog post serves as a guide to help you access these new reports. It walks you through the step-by-step process of using a special tool called the App Store Connect Swift SDK. The guide covers everything you need to know, including setting up the SDK, requesting data for a specific app, seeing all the available reports, and even downloading specific reports like app crash reports.
By following this guide, you can leverage the power of these new App Store Connect reports to gain much deeper insights into your app's performance. This can help you identify areas for improvement and ultimately create a better user experience for your app users.