Post

Replies

Boosts

Views

Activity

Do not compile MLModel in Swift Package Bundle
Hello, I want to add a .mlmodel to my swift package to have a test to verify that the compilation is working. targets: [     .target(       name: "packageName",       dependencies: ["package1"]     ),     .testTarget(       name: "packageNameTests",       dependencies: ["packageName"],       resources: [         .copy("Resources/testmodel.mlmodel"),       ]     )   ] My problem is the .mlmodel is always as a compiled model after bundling let docsPath = Bundle.module.resourcePath! let docsArray = try fileManager.contentsOfDirectory(atPath: docsPath)     print(docsArray) leads to ["testmodel.mlmodelc"] I am excepting testmodel.mlmodel to be present instead. I find it strange that copy is processing the ressource. Is there a workaround ? I am using Xcode 14 beta but there is a similar post on StackOverflow without answer regarding this issue https://stackoverflow.com/questions/64298356/how-to-add-uncompiled-mlmodel-to-xcode-unittests-bundle that got this problem with Xcode 12 Thank you
0
0
454
Jul ’22
Error when clicking on TextField : CLIENT ERROR: TUINSRemoteViewController does not override -viewServiceDidTerminateWithError: and thus cannot react to catastrophic errors beyond logging them
Hello, I face an error everytime I want to interact with a TextField. The XCode debug area is showing : CLIENT ERROR: TUINSRemoteViewController does not override -viewServiceDidTerminateWithError: and thus cannot react to catastrophic errors beyond logging them There is no crash, and the text field is working fine. I am developing for MacOS using a macbook pro Intel from 2019 with Sonoma 14.5 and Xcode 15.4 and I think that I noticed since the release of Sonoma. I was not particularly concerned by it but I noticed that interacting with the textField was leading to severe hang in my app, and micro-hang in the test app and I am wondering is these two issues could be related. The message is easy to reproduce. Just create a new Project/Application/App using SwiftUI and add a TextField to the ContentView. When you start app, click or double click on the text field, enter a message and press enter. import SwiftUI struct ContentView: View { @State var value: String = "" var body: some View { VStack { Image(systemName: "globe") .imageScale(.large) .foregroundStyle(.tint) Text("Hello, world!") TextField(text: $value, label: { Text("Test") } ) } .padding() } } Did you notice the same thing ? How I could solve it ? Note : I already posted the problem on Swift forums but it was close because related to SwiftUI https://forums.swift.org/t/error-when-clicking-on-textfield-client-error-tuinsremoteviewcontroller-does-not-override-viewservicedidterminatewitherror-and-thus-cannot-react-to-catastrophic-errors-beyond-logging-them/72134/1 Thank you
21
11
4.4k
Jun ’24