Post

Replies

Boosts

Views

Activity

Reply to NWBrowser scan for arbitrary Bonjour Services with Multicast Entitlement ?!
Hi Matt and Quinn, Thank you for your fast reply. This light up things for me, i will try to get the service list via dnssd framework. To get the Endpoints I can then use NWBrowser. Just for clarification, the entitlement is still needed to do this or for iOS 14+ ? I used NSNetservice in the past and it was possible to get service list without the entitlement. Thank you both
Jun ’21
Reply to Is this a bug or a feature?
I am experiencing the exact same problem with the current iOS/Xcode version. The issue occurs intermittently but completely breaks the database. It appears that the data is not always saved correctly, and attempting to load it subsequently leads to an exception. In my network measurement app, I attempt to store the results using SwiftData. I have tried disabling autosave and saving the context manually, but the problem persists. Additionally, I tried removing the @Attribute(.unique) from my UUID field, but this does not seem to resolve the issue. This is my model: @Model internal class StorageModel { var uuid: UUID var date: Date var result: ResultModel required init(uuid: UUID = UUID(), date: Date = Date(), result: ResultModel = .init()) { self.uuid = uuid self.date = date self.result = result } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Nov ’23
Reply to What version of Xcode can I make a game for older iOS versions (ex: iOS 5) but still playable on iOS 17?
I don't understand your goal here? Probably everything should be able to work from iOS 5 to 17 if you write your app in Objective-C and don't use API's, Frameworks whatever that are not supported on iOS 5.0 (but can be handled by using some pre processor stuff). The Question is why should you do this? Why do you want support such an old OS Version that is outdated for years and nearly nobody is using It by today. Before you start you should maybe take some footsteps in the Coding Game for better understanding everything ;) Cheers Vinz
Jan ’24
Reply to Is this a bug or a feature?
I have found a Solution that worked for me and I was able to reproduce the error. It seems that SwiftData don't likes having directly optional values. I attached an example for better understanding. If I have no optionals directly (inside an array it seems to work) the problem is gone for me. @Model internal class StorageModel { var uuid: UUID var date: Date var result: ResultModel required init(uuid: UUID = UUID(), date: Date = Date(), result: ResultModel = .init()) { self.uuid = uuid self.date = date self.result = result } } internal struct ResultModel: Codable { internal var uuid = UUID() internal var locations: [LocationModel] = [] // This is okay internal var location = LocationModel? // This causes the crash for me internal var workingLocation = LocationModel(latitude: .zero, longitude: .zero) // This is also okay } internal struct LocationModel: Codable { internal var latitude: Double? internal var longitude: Double? init(latitude: Double, longitude: Double) { self.latitude = latitude self.longitude = longitude } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jan ’24
Reply to Handle multiple AsyncThrowingStreams in structured concurrency?
Hi Quinn, Thanks a lot for your response. I initially thought it wouldn't be possible to add a Task afterwards because the entire workflow differs a lot in concurrency in comparison to the "old" way I implemented things. But I decided to currently stay away from concurrency for my custom network stuff. I exposed the high level API of my framework to concurrency and that works pretty well in the app and makes the ViewModel much more readable. But internally I'm not really happy with the flow control and it's much harder to build a good solution when I have to deal with a lot of AsyncSequences. I'm sure the Network.framework Engineers will build something fantastic and most of time im very impatient but I think it's worth the wait until Network.framework supports concurrency out of the box. Then I think it's much easier for me to build an appropriate solution for my framework. But all in all. Thank's for your work, you always helped me a lot in the last years 😊
Mar ’24