The following article introduces the new Swift Subprocess package for running Terminal commands and launching command-line programs from Swift apps:
https://swiftdevjournal.com/posts/subprocess/
#Swift #MacDev
@swiftdevjournal.mastodon.world.ap.brid.gy
I develop Mac and iOS apps (Phel, Bartleby, AM Pages) in Swift using SwiftUI and AppKit. I also write about app development in Swift at Swift Dev Journal. π bridged from β https://mastodon.world/@swiftdevjournal, follow @ap.brid.gy to interact
The following article introduces the new Swift Subprocess package for running Terminal commands and launching command-line programs from Swift apps:
https://swiftdevjournal.com/posts/subprocess/
#Swift #MacDev
The following article shows how to add an Open Recent menu to a SwiftUI app:
https://swiftdevjournal.com/posts/open-recent-menu/
#SwiftUI
Audio Descriptions https://wesleydegroot.nl/blog/audio-descriptions #Accessibility #SwiftUI
Wondering how long your app takes to launch? The following article shows how to use Instruments to measure your app's launch time:
https://swiftdevjournal.com/posts/measure-app-launch-time/
#Xcode
The following article shows how to use the new SwiftUI instrument to find the views in your app that update the most:
https://swiftdevjournal.com/posts/swiftui-frequent-view-updates/
#SwiftUI #Xcode
The following article explains why an Observable class's init runs multiple times in SwiftUI:
https://livsycode.com/swiftui/why-your-observable-class-init-runs-multiple-times-in-swiftui/
#SwiftUI
The following article shows how to use MapKit to create maps in SwiftUI apps:
https://www.createwithswift.com/creating-maps-in-swiftui-apps-with-mapkit/
#SwiftUI
The following article shows a process to create SwiftUI animations:
https://www.swiftdifferently.com/blog/swiftui/swiftui-animation-with-example
#SwiftUI
I tried using SwiftUI's new support for rich text in TextEditor. It's nowhere near a replacement for NSTextView on Mac.
You have to open the ruler from the Format menu to show rich text formatting controls. The controls are limited compared to NSTextView's inspector.
The worst issue is [β¦]
If you're looking for a course on learning Instruments, take a look at the course details. https://mastodon.social/@jamesdempsey/116092908262340740
This article provides a nice introduction to supporting Voice Control in SwiftUI apps. https://mastodon.social/@0xWDG/116084677459556586
The following article shows how to create a Toast component in SwiftUI:
https://livsycode.com/swiftui/building-a-toast-component-in-swiftui/
#SwiftUI
The following article introduces Metal shaders and shows how to use them in SwiftUI apps:
https://www.createwithswift.com/taking-first-steps-into-metal-shaders/
#SwiftUI
SwiftUI instrument tip: take the following steps to find the code causing long updates:
1. Right-click on a red or orange bar in the graph.
2. Choose Set Inspection Range.
3. Switch to the Time Profiler instrument.
4. Hide System Libraries.
5. Double-click a function to see the lines of code [β¦]
The following article shows how to morph a sheet directly from a button in a SwiftUI app:
https://serialcoder.dev/text-tutorials/swiftui/morphing-sheets-out-of-buttons-in-swiftui/
#SwiftUI
If you have trouble figuring out what Instruments is reporting, my Profiling Swift Apps book can help.
https://swiftdevjournal.com/instruments-book/ https://mastodon.social/@alexsteinerde/116029192259707294
The following article shows how to support SwiftUI sidebar selection when the sidebar has multiple types of items:
https://swiftdevjournal.com/posts/sidebar-selection/
#SwiftUI
The following article talks about problems you may encounter when converting existing code from ObservableObject to the Observation framework :
https://captainswiftui.substack.com/p/objectively-better-observably-trickier
#SwiftUI
TIL: the URL NSSavePanel returns for a folder does not include a trailing slash while SwiftUI's fileImporter includes the trailing slash.
#MacDev
Instruments tip: take the following steps to find the code in your app causing a hang:
1. Right-click on the hang in the graph
2. Choose Set Inspection Range to focus on the hang
3. Switch to the Time Profiler instrument
4. Click the Call Tree button at the bottom of the window
5. Select the [β¦]
The following article shows how to share content among iOS and Mac apps:
https://www.createwithswift.com/sharing-content-among-apps-using-appentity-and-transferable-protocol/
#iOSDev #MacDev
The following article shows how to use the new SwiftUI instrument to find the views in your app that update the most:
https://swiftdevjournal.com/posts/swiftui-frequent-view-updates/
#SwiftUI #Xcode
SwiftUI instrument tip: take the following steps to find the code causing long updates:
1. Right-click on a red or orange bar in the graph.
2. Choose Set Inspection Range.
3. Switch to the Time Profiler instrument.
4. Hide System Libraries.
5. Double-click a function to see the lines of code [β¦]
The following article shows how to prevent SwiftUI text fields from updating twice when filtering the text input:
https://livsycode.com/swiftui/how-to-avoid-double-updates-when-filtering-swiftui-textfield-input/
#SwiftUI
Article link: https://www.createwithswift.com/providing-access-to-premium-features-with-storekit-2/ https://mastodon.social/@n0rthk1n9/115929064183477036
If you find that your SwiftUI views have too many .sheet modifiers, the following article shows a way to reduce the number of modifiers:
https://swiftdevjournal.com/posts/reducing-sheet-modifiers/
#SwiftUI
The following article shows how to support SwiftUI sidebar selection when the sidebar has multiple data types:
https://swiftdevjournal.com/posts/sidebar-selection/
#SwiftUI
SwiftCrossUI looks like an interesting project if you want to build Windows and Linux apps using a SwiftUI-like syntax. https://mastodon.social/@stackotter/115903981719529756
Instruments tip: take the following steps to find the code in your app causing a hang.
1. Right-click on the hang in the graph
2. Choose Set Inspection Range to focus on the hang
3. Switch to the Time Profiler instrument
4. Click the Call Tree button at the bottom of the window
5. Select the [β¦]
Do you have performance problems in your app, such as the app running slow or using tons of memory? Do you struggle to find the cause of those problems?
If you answered Yes to both questions, my Profiling Swift Apps book can help. The book shows you how to use Instruments to find performance [β¦]