336,318 questions
0 votes
0 answers
6 views
How to use custom version of swift in Xcode?
I am using Mac 14 and the highest version of Xcode that I can install is 16.2 And it comes with the bundled swift component - 6.0.3 version. But my project requires swift 6.2 or later. I was able to ...
0 votes
1 answer
42 views
iOS 26: UIScrollView topEdgeEffect not applied
I am trying to use the topEdgeEffect API in iOS 26, but even setting the effect style to ".soft" does not work: class ViewController: UIViewController { var scrollView: UIScrollView! ...
1 vote
1 answer
43 views
SwiftData update causes render with initial data overwriting changes
I'm working on a SwiftUI app using SwiftData, and I'm very new to both frameworks, and swift in general to be honest. I'm trying to create a webview that embeds a monaco editor that will then send the ...
2 votes
2 answers
81 views
Difference in Double representation between Kotlin and Swift
In Kotlin, if you do println(String.format("%.17f", 10.45)), you will see 10.45000000000000000 in the output. In Swift, if you do print(String(format: "%.17f", 10.45)) you will see ...
0 votes
0 answers
22 views
How to implement long press (minimum duration) for iOS widget buttons?
I've seen apps that have interactive widget buttons where a short tap does nothing, but holding the button for at least 1 second executes the action. This can be configured per button in the widget ...
0 votes
0 answers
18 views
Swift can’t load resource folder at runtime (“No such file or directory”) even though files are added to Xcode [duplicate]
I'm building a macOS app in SwiftUI and I'm trying to load a folder called Wallpapers that I added to my Xcode project. The folder contains subfolders (categories) and each category contains wallpaper ...
0 votes
0 answers
22 views
Custom UITabBar badge color ignored when switching to Map tab in iOS 18+
I found a reproducible issue in iOS 18+. When a SwiftUI TabView contains a Map (MKMapView), any custom UITabBarAppearance badge color is ignored while that tab is active. As soon as you switch to a ...
1 vote
0 answers
27 views
How to create a SwiftUI Menu with multiple Pickers without extra dividers?
I'm trying to create a SwiftUI Menu containing two Picker to control content and sort. However, I cannot replicate menu appearance shown in my reference screenshot. No matter which approach I try, I ...
1 vote
2 answers
62 views
SwiftUI @FocusState doesn’t focus a desired TextField
I have a SwiftUI view with multiple TextFields and a @FocusState bound to my view model. I want the first field to automatically get focus whenever the view appears(when coming back from a SecondView)....
0 votes
1 answer
47 views
How to present app-wide alerts/sheets above existing sheets in SwiftUI (central presenter like UIKit)?
TL;DR: my app has some global alerts and modals (e.g. hints about trial limits, the in-app purchase screens, etc.) which should be available through out the app. In UIKit I could always present alerts ...
0 votes
0 answers
33 views
iOS26 AVSampleBufferDisplayLayer crash
libobjc.A.dylib _objc_retain_x0 16 AVKit -[AVSampleBufferDisplayLayer(AVPictureInPictureSuppport) avkit_sampleBufferDisplayLayerPlayerController] 36 AVKit -[AVSampleBufferDisplayLayer(...
0 votes
0 answers
18 views
XCode StoreKit helper application failure - Purchase Fails with NSCocoaErrorDomain Code=4099 and ASDErrorDomain Code=5115
XCode version = 26 && macOS version = 26 Running the app from XCode (not in release mode) I want to implement in app purchases for my macOS application, for that i want to first test it ...
Best practices
0 votes
1 replies
32 views
Check if specific date is at least tomorrow in Swift
What is the best way to properly check if a date is at least tomorrow? So far I was able to come up with this solution, but I'm not 100% sure it's correct: let calendar = Calendar.current func ...
0 votes
0 answers
18 views
iOS EXC_BAD_ACCESS when launching HyperVerge KYC camera from React Native Expo app (Android works)
I’m integrating HyperVerge as my KYC provider in a React Native + Expo app. On Android everything works fine. On iOS, the flow is: HyperVerge captures the user’s face successfully When the SDK asks ...
1 vote
1 answer
60 views
Pre-Selecting Values for a MultiDatePicker
Premise I have a MultiDatePicker bounded to a closed range of the current month. In addition, I have a datePicker representing a "Start Date" that is the current day. I want the Day of the ...