We get two error message in Xcode debug. apple.model.catalog we get 1 time at startup, and the nw_protocol_instance_set_output_handler Not calling remove_input_handler on 0x152ac3c00:udp we get on sartup and some time during running of the app. I have tested cutoff repos WS eg. But nothing helpss, thats for the nw_protocol. We have a fondationmodel in a repo but we check if it is available if not we do not touch it.
Please help me?
nw_protocol_instance_set_output_handler Not calling remove_input_handler on 0x152ac3c00:udp
com.apple.modelcatalog.catalog sync: connection error during call: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.modelcatalog.catalog was invalidated: Connection init failed at lookup with error 159 - Sandbox restriction." UserInfo={NSDebugDescription=The connection to service named com.apple.modelcatalog.catalog was invalidated: Connection init failed at lookup with error 159 - Sandbox restriction.} reached max num connection attempts: 1
The function we have in the repo is this:
public actor FoundationRepo: JobDescriptionChecker, SubskillSuggester {
private var session: LanguageModelSession?
private let isEnabled: Bool
private let shouldUseLocalFoundation: Bool
private let baseURLString = "https://xx.xx.xxx/xx"
private let http: HTTPPac
public init(http: HTTPPac, isEnabled: Bool = true) {
self.http = http
self.isEnabled = isEnabled
self.session = nil
guard isEnabled else {
self.shouldUseLocalFoundation = false
return
}
let model = SystemLanguageModel.default
guard model.supportsLocale() else {
self.shouldUseLocalFoundation = false
return
}
switch model.availability {
case .available:
self.shouldUseLocalFoundation = true
case .unavailable(.deviceNotEligible),
.unavailable(.appleIntelligenceNotEnabled),
.unavailable(.modelNotReady):
self.shouldUseLocalFoundation = false
@unknown default:
self.shouldUseLocalFoundation = false
}
}
So here we decide if we are going to use iPhone ML or my backend-remote?