Welcome to another issue!
Question for you! โ
I don't have an X (ex-Twitter) account for this newsletter yet. Do you think it's worth creating it?
How often do you use it? It seems that without paying to X, you'll mostly see spam and ads. Let me know your thoughts.
Thanks so much for reading the newsletter and for your support.
Let's dive in!
Subscribe to another newsletter I run!
3000 subscribers already! ๐
Weekly newsletter featuring the best tools for iOS developers. Subscribe if you like @iOS developers
Sponsored Link
A CI/CD for mobile dev teams trusted by 150,000+ developers
Automate the whole build, test, and release pipeline of your iOS apps to get to the market 20% faster.
Swift Around the Web
Exploring Swift 5.10: A concurrency revolution
Discover the latest release of Swift 5.10, focusing on enhancing concurrency. With new checks and optimizations, Swift concurrency is now more effective in preventing data races and improving user experience.
Explore how this emphasis on concurrency revolutionizes Swift development for smoother, more efficient coding.
An introduction to isolation in Swift
To prevent data races, Swift uses an isolation mechanism at compile time. Using this approach, the compiler can decide how and when data can be accessed or not accessed. Managing isolation is critical and confusing.
In swift, everything is non-isolated by default. To change this, you need to take isolation actions. That comes in three flavours - None, Static and Dynamic.
Mainly global actors, Actor Types and isolated parameters are forms of static isolation. Using Await keywords, closures, non local variables , we can implement isolation in Swift. Dynamic isolations is tool which is invisible when you look at definitions. You can also get rid of isolation using non-isolated keywords.
Coding
Modding plugins back into Xcode
Xcode Plugins allows us to tweak Xcode to make it behave in exactly the way we want. in Xcode 14, Apple removed plugin support entirely.
It would load any plugins that were placed in a user-specific directory (~/Library/Application Support/Developer/Shared/Xcode/Plug-ins), had mechanisms to ensure plugin compatibility, and even had warnings to make sure the plugins were being loaded intentionally.
In this guide they have covered disabling runtime hardened, code-signing with Xcode, disabling the system integrity protection, code injection by keeping a copy of Xcode in that we can inject our own code using the macOS Library template.
Explained the Xcode plugins are just NSBundles with an example to print out a list of items in the hard-coded directory that Xcode previously would load plugins from.
Xcode Plugins work by hooking into Xcode internals, but also the thing is Xcode versions that the internal functionality they rely on may have changed after an update, this makes it important for Xcode Plugins to be able to specify which versions of Xcode theyโre compatible with.
visionOS
Shattered Glass: Customizing Windows in visionOS
Developing for visionOS, it may seem like your app is stuck in a flat pane of glass. But with the right SwiftUI modifiers โ and maybe a sneaky call to UIKit.
Key ideas of VisionOS:
- It introduces windows that exist within your physical space, not confined to a traditional screen.
- These windows can be manipulated using hand gestures or voice commands, offering a more interactive experience.
- Apps can utilize these windows to overlay digital information directly onto your physical surroundings, potentially transforming how we interact with technology.
The main thing under focus is removing the glass background from the window. It has two options:
- Shape mode
- Display mode
The blog suggests that VisionOS windows represent a significant shift towards a more immersive and intuitive user experience within an AR environment.
Design
LabeledContent in SwiftUI
LabeledContent was introduced in SwiftUI 4.0 at WWDC22 and it's one of the many features that can help you write more readable code.
LabeledContent automatically adds informative labels to your data elements, be it read-only text or editable controls. This provides users with a clear understanding of the data they're interacting with.
LabeledContent intelligently adjusts its presentation based on its container (forms, toolbars, etc.), ensuring a consistent and visually pleasing interface across your app.
This intuitive feature promotes cleaner code, reduces the need for manual layout adjustments, and simplifies the overall UI development process.
Other Cool Stuff
Picture in Picture cheat sheet
This blog serves as a comprehensive guide for developers implementing PiP functionality in their iOS apps.
PiP Made Easy! This blog offers a quick guide for developers to add PiP functionality. Learn how to:
- Enable PiP: Allow your app's videos to play in a small window while using other apps.
- Essential Requirements: The prerequisites for enabling PiP, such as supporting specific video codecs and aspect ratios.
- Control the experience: Customize the PiP window, playback options, and behavior during use.
- Handle different situations: Ensure your app functions properly when PiP is active and the device orientation changes.
- Key Considerations: Highlights important aspects like maintaining app functionality in PiP mode.
Notes:
- When we try to restore the UI, make sure the frame of your player view stays consistent and doesnโt change, otherwise PIP animation will get buggy and animate to the wrong position.
- Playback restoration will require some effort depending on how your app is architected and what stack it use
Videos
macOS 14.4 SDK: Enhancements and fixes for developers
The macOS 14.4 SDK facilitates the development of applications for Mac computers running Sonoma 14.4. Packaged with Xcode 15.3, available from the Mac App Store, the SDK introduces enhancements and fixes across various areas.
These improvements encompass AppKit enhancements, Core Audio security updates, improvements to Core ML and CreateML functionalities, fixes for Finder and Messages, and enhancements to StoreKit for handling product descriptions and promotional offers.