336,278 questions
0
votes
0
answers
16
views
Swift Concurrency Confusion: Why My Actor Didn’t Serialize Tasks [duplicate]
I'm rewriting some old Swift code from GCD to Swift Concurrency. The core of the old code is a function—let's call it doImportantStuffOld(handle: (String) -> ())—that performs an expensive task in ...
1
vote
1
answer
28
views
RealityKit how to get callback after a component is removed
Looking at the ComponentEvents doc, there doesn't seem to be a DidRemove API. I wonder how I can get notified after a component is removed.
For some context, I am implementing a "glowing border&...
-2
votes
1
answer
32
views
PDF export looks worse than processed images (text gets “holes”)
PDF export looks worse than processed images (text gets “holes”). How to embed raster 1:1?
I have an iOS pipeline that produces crisp, binarized grayscale images (Otsu/adaptive; slight contrast/gamma)....
1
vote
0
answers
28
views
How to render drop shadow like figma in Metal shader
I am new to Graphic programming and shaders and I am working on a Metal fragment shader that downscales a video frame by 20% and adds a soft drop shadow around it to create a depth effect. The shadow ...
0
votes
0
answers
21
views
LockedCameraCaptureExtension and Sharing User Preferences
I have the main app that saves preferences to UserDefaults.standard. So I have this one preference that the user is able to toggle - isRawOn
UserDefaults.standard.set(self.isRawOn, forKey: "...
0
votes
1
answer
36
views
TipGroup tip presented as sheet iOS 18 instead of a popover tip
While using TipKit's TipGroup I encountered what I believe to be a bug:
The second tip of the TipGroup is presented as a sheet.
I've watch the two WWDC sessions about TipKit and the implementation ...
0
votes
1
answer
37
views
iOS 26.1 Why is KeyboardDidShowNotification triggered repeatedly when a TextField gains focus
The following code triggers the "keyboardDidShowNotification" to be triggered continuously (every couple milliseconds) when the TextField gains focus in iOS 26.1.
import SwiftUI
var ...
0
votes
0
answers
23
views
iOS local network permission prompt not appearing for `MultipeerConnectivity` despite `NSBonjourServices` in `Info.plist`
I'm building an iOS app using MultipeerConnectivity for local peer-to-peer networking. The local network permission prompt isn't appearing, and I'm getting -72008 errors (NSNetServicesErrorDomain).
...
0
votes
0
answers
59
views
Can't connect to firebase auth emulator
I successfully had the firebase auth emulator working a few days ago, but it has mysteriously stopped working. I get a generic network error when trying to authenticate with any platform. I am using a ...
0
votes
0
answers
51
views
How to disable effect Liquid Glass on Tabview?
I can’t remove the Liquid Glass / translucent blur background from the TabView (iOS 15+). I want the tab bar to be fully transparent so my custom background image shows through. Instead, the tab bar ...
1
vote
0
answers
27
views
Missing delegate callbacks when text is auto-replaced (suggested words or double-space “.” shortcut)
I’ve built a custom text editor using TextKit 2, and I’ve noticed that some text changes triggered by the system keyboard are not traceable through the usual delegate methods or text editing lifecycle....
0
votes
1
answer
30
views
Swift Observation + AsyncStream: value updates lag one cycle behind termination state change
I’m using Swift’s new Observation framework to create an AsyncStream that reacts to changes in an observable object. The stream should emit new values whenever a tracked property changes and ...
Advice
0
votes
1
replies
47
views
Integrating C++ and Swift Libraries into One Unified Platform
So I'm running into a Fatal Error when compiling swift code on a Windows PC Running as Administrator
0
votes
0
answers
58
views
iOS SVG files don't size correctly, examples are all wrong [duplicate]
When using SVG files in SwiftUI for iOS, the Image("myicon.svg") view works, but you can't scale the image smoothly because they rasterize the SVG and then resize. Here is an example:
struct ...
-1
votes
1
answer
89
views
Any way to hide the row in white background in List when using Context Menu SwiftUI?
Is there any way to hide the row that is in white background when context menu appears? I know it's because of List. I had to use List because adding ScrollView with LazyVStack on iOS 17, 18 had ...
0
votes
1
answer
54
views
UITextField selects all text on focus when the content is long — how to keep the caret at the end?
I’m building a custom input field using UITextField. When the user taps to focus the field and the text is long, the entire text becomes selected by default. This is the same behavior you can see in ...
0
votes
1
answer
83
views
Strings Catalog in Xcode 26 with auto-generated symbols: device won't use correct language
I watched the talk at WWDC25 where Apple introduced the generated symbols feature for Strings Catalog.
Since I have just started a new project as my first iOS development experience (I come from 10+ ...
0
votes
1
answer
62
views
Xcode Can't Find swift-transformers Package
I'm trying to implement Speech-to-Text transcription in my Swift app using Hugging Face's swift-transformers package to run Whisper models locally.
I've added the package to my Xcode project, but when ...
2
votes
0
answers
62
views
ScreenCaptureKit recording output is corrupted when captureMicrophone is true
I'm working on a screen recording app using ScreenCaptureKit and I've hit a strange issue. My app records the screen to an .mp4 file, and everything works perfectly until the .captureMicrophone is ...
-2
votes
0
answers
38
views
How to save photos taken with a SwiftUI Camera app [closed]
I have a Camera app written mostly in SwiftUI and i want the photos taken with it to be saved on app with my app having its own gallery from which you can export photos to the iphone gallery. I know ...
0
votes
2
answers
124
views
SwiftUI map & list draggable resizing issue
I am trying to create a resizable split view in SwiftUI where a Map is on top and a List(which will contain locations later) is on the bottom, separated by a draggable handle. The user should be able ...
0
votes
1
answer
73
views
MapAnnotation custom callout button action not working
I am trying to display a map with custom annotations (pins) and custom callout views in SwiftUI.
My Goal:
A user taps on a map pin.
A custom callout view appears above the pin.
This callout view ...
1
vote
1
answer
61
views
Swift/objc interoperability and modern swift concurrency
How to resolve error:
Non-Sendable parameter type BookInfo of actor-isolated @objc instance method cannot cross actor boundary?
BookStore.swift:
// manage state of instances of BookInfo
@objc actor ...
2
votes
1
answer
71
views
AVAssetExportSession ignores frameDuration 60fps and exports at 30fps, but AVPlayer playback is correct
I'm stuck on a really frustrating AVFoundation problem. I'm building a video editor that uses a custom AVVideoCompositor to add effects, and I need the final output to be 60 FPS.
So basically, I ...
0
votes
0
answers
46
views
NSTableView problems, a quick click after double action loses focus [closed]
@objc func tableViewDoubleClick(_ sender: AnyObject) {
guard let tableView = sender as? NSTableView else { return }
let clickedRow = tableView.clickedRow
let clickedColumn = tableView....
-1
votes
1
answer
93
views
Swift / CoreGraphics: semicircular arc draws correctly but arrow pointer position/rotation doesn't match BMI value in exported PDF
I'm drawing a semicircular BMI gauge in a PDF using UIGraphicsPDFRenderer and UIBezierPath. The colored arc and labels render correctly, but the arrow pointer (which should point to the arc position ...
0
votes
0
answers
28
views
How to get AVPlayer’s final redirected URL when playback fails (accessLog is nil)
I’m playing HLS with AVPlayer. The URL I load redirects to the actual stream:
https://example.com/video/latest.m3u8 --> https://example.com/video/123456.m3u8
What I see
AVPlayer.currentItem....
1
vote
2
answers
69
views
How does .borderedProminent always make button text white unless I set a foregroundStyle?
I'm making a custom button style, and I was trying to model some of it around Apple's existing ones.
In particular, on .buttonStyle(.borderedProminent) I’ve noticed the text is always white in both ...
-4
votes
0
answers
27
views
Open URL with AppIntent without using UIApplication.shared [duplicate]
I got the following AppIntent and it works well:
@available(iOS 16, *)
struct SelfieCameraIntent: AppIntent {
static let title : LocalizedStringResource = "Selfie Camera&...
0
votes
0
answers
31
views
Xcode not showing syntax or compile errors in Development Pod (Flutter plugin)
The plugin is added to my Flutter app using a local development pod like this:
pod 'face_native', :path => '../face_native/ios'
Inside face_native/ios/ I have my .podspec file and several Swift ...
0
votes
1
answer
70
views
Generic types in Swift 6+ with Protocols and Structs
Coming from an Android & Kotlin background, I am trying to adapt my Android app to iOS for which I have no dev experience whatsoever.
My app uses the state machine pattern to handle the UI and UI ...
0
votes
2
answers
60
views
How to create dictionary literal base on Dictionary?
Here is my simple example:
func style() -> KeyValuePairs<String, Color> {
let values = ["a": Color.black, "b": Color.red] // this array is dynamic
return ...
-3
votes
1
answer
75
views
React Native Screen Time API Issue [closed]
I am trying to implement a Screen Time API in react native and the native "select activities" sheet pops up and is working. But, it is very hard to exit out of and you can only scroll out of ...
-1
votes
0
answers
64
views
View controller title color not inverting based on background [closed]
Using Xcode 26.0.1 and running on iOS Simulator "iPad (A16)" with iOS 26.0.1.
I am presenting a view controller as Full Screen in a navigation controller.
It has a leftBarButtonItem, ...
0
votes
0
answers
89
views
Navigation bar back button random background behaviour in iOS 26
Navigation bar back button sometimes has a white background on its liquid glass layer when I navigate to the screen.
I want it to be of clear background as shown below.
I am not setting any tint or ...
5
votes
1
answer
170
views
AVFoundation Custom Video Compositor Skipping Frames During AVPlayer Playback Despite 60 FPS Frame Duration
I'm building a video editor in Swift using AVFoundation with a custom video compositor. I've set my
AVVideoComposition.frameDuration to 60 FPS, but when I log the composition times in my startRequest ...
-1
votes
0
answers
78
views
macOS displaying NSPopover an Alert is shown
I have a macOS app that appears only in the status bar as nspopover. The popover opens and closes correctly in all cases except one: when popover is hidden and an alert is displayed within the app, ...
0
votes
0
answers
42
views
iOS archive failed in GitLab CI/CD: “SWIFT_OPTIMIZATION_LEVEL=-O expected -Onone (React-jsitracing)”
I’m trying to build and archive my React Native iOS app using GitLab CI/CD, but the build fails during the archive step. Below is the error message I get:
note: Disabling previews because ...
3
votes
1
answer
121
views
RealityKit how to support post process with custom camera
I have this following minimal reproducible code:
import UIKit
import RealityKit
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
let arView =...
0
votes
1
answer
43
views
iOS Universal Links not triggering scene(_:continue:) when app is already running [duplicate]
I'm trying to handle iOS Universal Links in my SwiftUI app.
Cold start: when I open the link from Safari or Notes and the app is closed — everything works fine.
Hot start: when the app is already in ...
0
votes
2
answers
129
views
All TipKit Views are not showing with button action
I have 4 tips to show in screen so i have created like this
code:
struct TipContent {
let title: String
let message: String
}
// MARK: - TipKit Manager
class TipKitManager: ObservableObject {
...
-7
votes
1
answer
75
views
No such module 'IntelligenceFoundation' [closed]
I am trying using Foundation Models
in Swift, but I get Xcode error "No such module 'IntelligenceFoundation'"
How to properly import needed?
(the code generated using claude.ai with prompt
...
-1
votes
1
answer
52
views
MacOS keychain access group failing with kSecUseDataProtectionKeychain
I've been using a Mac keychain access group so that my main app and helper app can share common user settings and keychain items. This appears to have been storing and reading data in the main app ...
6
votes
0
answers
101
views
RealityKit how to filter entities in post process
I am implementing a "glow" effect in RealityKit. I followed this open source library which is in SceneKit: https://github.com/laanlabs/SCNTechniqueGlow. The basic idea is to create a "...
0
votes
1
answer
123
views
Tab View on Rotation to Landscape Causing Color to Fade and Title to Shrink
I am having some trouble with tab views with a color header and a large title. Upon first tab selection, the large title with green header appears great. But once the iPhone is rotated from portrait ...
-2
votes
0
answers
150
views
Tab bar background tint in iOS 26 [closed]
Since iOS 26 the tab bar uses the new Liquid Glass design. Is it possible to give the tab bar background a tinted Liquid Glass?
When using the glassEffect modifier we can simply provide a tint:
....
1
vote
1
answer
65
views
iOS internationalization: What's the meaning of the placeholder?
Within "Localizable.xcstrings" string-catalog, for example "%lld click" or even more cryptic "%1$@-%2$@"?
What's there meaning? How have it to read and understood?
0
votes
1
answer
85
views
Is there a way to handle situations where a user has blocked more than 10 users, so that the app doesn’t exceed Firestore’s not-in query limit?
func fetchNextPage() async {
guard !isLoading, !reachedEnd else { return }
isLoading = true
defer { isLoading = false }
let excluded = Array(BlockService.shared.blocked.prefix(10))...
0
votes
0
answers
108
views
How to continuously refresh Live Activity text while the iOS app is in background?
I’m developing a text reader app that shows the currently playing sentence in Live Activity. I need the widget text to update continuously (maybe about every 2-5 seconds) while the app is in ...
0
votes
0
answers
68
views
How to create Swift Tasks and limit the number of concurrent tasks [duplicate]
I am trying to find something as elegant as OperationQueue.maxConcurrent = X that will allow the application to create any number of swift Task{}'s but that will ensure that only 4 such tasks can run ...