335,727
questions
0
votes
0
answers
6
views
GCKCastContext.sharedInstance().sessionManager.currentSession?.remoteMediaClient?.mediaStatus is always nil
In my iOS app I am casting videos to Chromecast and I also need to know current stream position. I already tried this solution. However, GCKCastContext.sharedInstance().sessionManager.currentSession?....
1
vote
0
answers
18
views
How to create buttons in stack view?
I want to create buttons in stack view like on this image example:
I'm trying to create it using code. I also need to create different code types for iOS 15 and earlier because I see the warnings ...
0
votes
1
answer
34
views
SwiftData Query
Been learning SwiftData and ran into a hiccup.
Let's say I have to data types User and Job
@Model
class User: Identifiable {
var id = UUID().uuidString
var name: String
var jobs = [Job]()
...
-3
votes
0
answers
31
views
Which Apple technologies to use for simple 2d motion graphics software? [closed]
I plan to create a simple motion graphics software for macOS that animates text, basic shapes, and handles audio. I'll use SwiftUI for the UI.
What are the commonly used technologies for rendering ...
0
votes
0
answers
12
views
swift NIO : udp client to send and receive without closing channel
I want to have a udp socket channel to send and receive data. Here is my implementation :
import NIOCore
import NIOPosix
public class UdpClient: @unchecked Sendable {
private var udpChannel: ...
0
votes
0
answers
19
views
SwiftData issue adding model objects when syncing to CloudKit
I'm building a simple app that persists data using the SwiftData framework with the additional capability of syncing through CloudKit across devices.
All was well until I added a second model object. ...
0
votes
0
answers
29
views
Why are there so many extra layers in my view hierarchy?
I have a simple app with a login screen. Once you log in, theres a test view that holds "Hello World" Text and nothing else. Its totally functional, but I noticed in the view hierarchy, a ...
1
vote
1
answer
32
views
Objects associated with enums in Swift lack ObservableObject and @Published wrappers, preventing state changes from updating the UI
I have a MainViewModel that holds an array of enums with associated objects. However, when I use this in a SwiftUI view, the variable loses its @Published wrapper, and the UI doesn't update or get ...
0
votes
1
answer
38
views
SWIFT TASK CONTINUATION MISUSE: - method leaked its continuation! - Not blocking main thread?
I have to use async/await with withCheckedThrowingContinuation to get a result from an external lib (I cannot modify this lib).
I call this from a UIViewController (which means the Task will be on the ...
0
votes
0
answers
17
views
Unable to access Objective-C types in Swift when building with Bazel
I'm trying to build a mixed Swift/Objective-C library using Bazel, but Swift code cannot access types defined in the Objective-C header. I've spent nearly two weeks researching and trying various ...
0
votes
0
answers
8
views
How to Append Custom Parameters to HLS Segment URLs in AVPlayer Using AVAssetResourceLoaderDelegate in Swift?
I’m working on an iOS application that uses AVPlayer to play an HLS stream. My goal is to dynamically append custom parameters to each segment URL (e.g., .ts files) during playback.
Example:
Given an ...
0
votes
0
answers
59
views
How to Enable BLE Scanning in the Background on iOS [duplicate]
I am trying to implement background BLE (Bluetooth Low Energy) scanning in an iOS app using CoreBluetooth. When my app is in the foreground, I can successfully scan and collect BLE device data. ...
0
votes
0
answers
15
views
iOS getting context for view controller `isMovingFromParent`
Is there a way to identify how the popping of view controller from navigation controller is triggered? For example, with an edge swipe / pressing of the back button on the navigation bar / pressing of ...
0
votes
0
answers
12
views
Issue with Extra Space Appearing in UITableViewController after Dismissing UISearchController
I am just starting with Swift and I tried googling this issue, but I haven't been able to find a solution. I’m using a UITableViewController with a UISearchController in my iOS app to search a list of ...
0
votes
1
answer
39
views
Change font of tab bar labels?
I'm trying to implement a custom font (OpenSans) in my SwiftUI app.
Most of my views are happy to take the font and I know therefore that it's being loaded from the bundle correctly. However, there ...