Posts

Post marked as solved
8 Replies
5.7k Views
My app has to find a certain bonjour service on the local network and my code works fine for iOS 12/13 as well as macOS Big Sur and Catalina. The exact same code fails on iOS and iPadOS 14 with this error: ["NSNetServicesErrorDomain": 10, "NSNetServicesErrorCode": -72000] Which I have looked into and -72000 is an "Unknown error". I am using NetServiceBrowser to find the service and here is my code: class Bonjour: NSObject {     var discovered: [DiscoveredInstance] = []     let bonjourBrowser = NetServiceBrowser()     var discoveredService: NetService?     override init() {         super.init()         bonjourBrowser.delegate = self         startDiscovery()     }     func startDiscovery() {         self.bonjourBrowser.searchForServices(ofType: "_some-service._tcp.", inDomain: "local")     } } extension Bonjour: NetServiceBrowserDelegate, NetServiceDelegate {     func netServiceBrowser(_ browser: NetServiceBrowser, didFind service: NetService, moreComing: Bool) {         discoveredService = service         discoveredService?.delegate = self         discoveredService?.resolve(withTimeout: 3)     }     func netServiceBrowser(_ browser: NetServiceBrowser, didNotSearch errorDict: [String : NSNumber]) {         print(errorDict)     }     func netServiceBrowser(_ browser: NetServiceBrowser, didRemove service: NetService, moreComing: Bool) {         self.discovered.removeAll { $0.name == service.name }     }     func netServiceDidResolveAddress(_ sender: NetService) {         if let data = sender.txtRecordData() {             let dict = NetService.dictionary(fromTXTRecord: data)             /// do stuff with txtRecord dict here and then add to discovered array.             discoveredService = nil         }     } } I have no idea what could be causing the error and have tried enabling networking permissions and capabilities but have not been able to stop the error from occurring. Thanks.
Posted
by Priva28.
Last updated
.
Post not yet marked as solved
2 Replies
485 Views
I have an iPad Pro running the iOS 14.5 beta but the Swift Student Challenge page says that I must be running iOS 14.4.2. Will I be ineligible if I create it on 14.5? I would downgrade but Apple has made it impossible to downgrade from 14.5 to 14.4 versions. What should I do in this instance?
Posted
by Priva28.
Last updated
.
Post marked as solved
7 Replies
822 Views
In Xcode, I am not able to save changes to my .scn file. When editing any component inside the scene file or even changing its name I will get an error saying that the file could not be saved. I have tried restarting my Mac and Xcode multiple times as well as changing permissions for the file and entire project folder. Even moving to a new project gives this error. Nothing has worked though. Also creating a blank scene file and adding a cube doesn't even work so it's not a problem with my file. How can I make changes to a .scn file and have it actually save?
Posted
by Priva28.
Last updated
.