Post

Replies

Boosts

Views

Activity

Reply to Multipeer Connectivity support
Hello, I'm using MulitpeerNetworking in an App for Long- and Tripplejump (JumpControl). A camera is located close to the take-off-board and is controlled by another device connected via Multipeer-Networking-API. Usually this works fine even for several meters distance. In real events, when there are more other devices around the connectivity becomes more and more unstable. Connection is lost or cannot be established again. Is there a way to make this connection more stable or at least get more information about the circumstances that makes it unstable? Is there a possibility to connect two iOS-Devices via cable-connection to improve stability?
Topic: App & System Services SubTopic: Core OS Tags:
1d
Reply to Escaping closure captures mutating 'self' parameter Error
I have the same problem and don't understand all hints on the net... My code is: `@Observable struct LADVAthletes { var queryName : String = "" var athletesList : [Athlete] = [Athlete]() var subscription : AnyCancellable? = nil mutating func searchInLADVAthlets() { print("Search in LADV for \(queryName)") let url = URL(string: "https://ladv.de/api/rriekert/athletQuery?query=\(queryName)*&limit=100") subscription = URLSession.shared .dataTaskPublisher(for: url!) .map(\.data) .decode(type: [Athlete].self, decoder: JSONDecoder()) .sink(receiveCompletion: { completion in if case .failure(let err) = completion { print("Retrieving data failed with error \(err)") } }, receiveValue: { object in self.athletesList = object print("Retrieved object \(object)") }) } }` I get the Escaping closure captures mutating 'self' parameter on the receiveValue-phrase.... Any hints?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jun ’23