Post

Replies

Boosts

Views

Activity

Reply to Disk Util File menu launches Admin-auth
I believe the problem is related to mounting a remote disk/directory and mdsstore hasn't finished listing all the files in its database. I can eject the volume at the remote location that initiated the connection, but on the computer that holds the accessed files... it cannot be ejected because "it is in use". All I can do is shutdown the host. BTW this happens even though a key exists in the keychain for that connection. I understand there exists a command-line way to tell mdsstore what NOT to gather. I'll look into that next.
Topic: App & System Services SubTopic: Core OS Tags:
Dec ’20
Reply to Disk Util File menu launches Admin-auth
Not a command-line way but SystemPref's:Spotlight:Privacy . Sadly, one must connect the drive in order to add it to the list or drag-n-drop it to the list. I've yet to find a way to edit a file BEFORE a drive is connected. Nevertheless, once added to the list and all clients disconnect from the drive, the server can eject the drive. So, one problem down, one to go.
Topic: App & System Services SubTopic: Core OS Tags:
Dec ’20
Reply to Disk Util File menu launches Admin-auth
I found this... https://discussions.apple.com/thread/1461768 ...and it works persistently with one caveat, when the remote drive is removed or disconnected, it is removed from the SystemPref's:Spotlight:Privacy list. However it will reappear when the remote drive is reconnected. Thank you RodneyW wherever you are. :-)
Topic: App & System Services SubTopic: Core OS Tags:
Dec ’20
Reply to Disk Util File menu launches Admin-auth
Still buggered by DiskUtility:FileMenu Persistent Auth dialog boxes though. There is no entry of any kind in SysPrefs:LoginItems. ref https://discussions.apple.com/thread/6858309 Specifically no "Boot Champ", nor what I suspect should be "Boot Camp" either... nothing. Curiously, I can use the Keychain App, access any password key that requires Administrator pwd, enter it but not necessarily make any changes to the key, then reopen Disk Utility, hit the File menu and NO Auth Dialog! But the effect is not persistent across reboots. Seems to be a Keychain issue but I don't want to experiment. Any suggestions? Thanks.
Topic: App & System Services SubTopic: Core OS Tags:
Jan ’21
Reply to How characters in Computer Name field get mapped to local hostname field?
I was formerly able to name my computer using Greek letters, and Xcode ID'd it as such. Since Big Sur (I think) I cannot use Greek characters and have had to rename my computer. This may be the source of errors I get in Xcode "[plugin] AddInstanceForFactory: No factory registered for id <CFUUID 0x600003023760> F8BB1C28-BAE8-11D6-9C31-00039315CD46 HALC_ShellDriverPlugIn::Open: opening the plug-in failed, Error: 2003329396 (what)" when trying to launch an .mov file from within my code. Searches provide varied but unsuccessful suggestions. I have since renamed my device ID with Developer, but the above still occurs. Eskimo's reply predates Big Sur and he was able to enter "foreign" characters. Or is there something else I'm missing?
Jan ’21
Reply to App does not use my permissions to create dir
eskimo, thanks for responding. The App Sandbox has no boxes checks or files selected, on the signing&capabilites for the target. As for "Files and Folders privilege", Xcode is not granted access to the Documents Folder, but neither can it be. Not for me and not for the administrators login acct. I found this: apple.stackexchange.com/questions/376907/add-apps-to-files-and-folders-permissions so this may be the problem. idk where EPERM nor EACCES might be found. They don't appear in the debugging area. This is my code for saving the file. Should be pretty standard, I see it everywhere. func saveBAToJSON(fileName: String, object: BinaryAttributes) {     var dirName = String()     if flatModel   { dirName += "flatModel"}     else           { dirName += "needleModel"}             10.     var ArchiveURL = URL(string: "")     if PLATFORMMACOS != 0 {  //  BOTH OS's ARE TRUE! Multiplatform project         let path = NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true).first!        ArchiveURL = URL(string: path)!         .appendingPathComponent("MyData")         .appendingPathComponent(dirName, isDirectory: true)         if !FileManager.default.fileExists(atPath: ArchiveURL!.absoluteString) {             do { try FileManager.default.createDirectory(atPath: ArchiveURL!.absoluteString, withIntermediateDirectories: true, attributes: nil) }             catch { print(error) } 20.         } 21.         let extfileName = fileName + "" + dirName 22.         let fileURL = URL(fileURLWithPath: (ArchiveURL!.absoluteString) + extfileName ).appendingPathExtension("json") 23.         do { 24.             let myJSONencoder = JSONEncoder() 25.           myJSONencoder.nonConformingFloatEncodingStrategy = .convertToString(positiveInfinity: "+Infinity", negativeInfinity: "-Infinity", nan: "NaN")   26.             let data = try myJSONencoder.encode(object) 27.                        try data.write(to: fileURL) 28.         } 29.       catch { print("248 Utility Functions.swift saveToJSON():", error) } 30.     } 31.     if PLATFORMIOS != 0 {  //  BOTH OS's ARE TRUE! Multiplatform project 32.         ArchiveURL = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask).first!.appendingPathComponent("MyData").appendingPathComponent(dirName, isDirectory: true) 33.         if !FileManager.default.fileExists(atPath: ArchiveURL!.absoluteString) { 34.             do { try FileManager.default.createDirectory(atPath: (ArchiveURL!.absoluteString), withIntermediateDirectories: true, attributes: nil) } 35.             catch { print(error) } 36.         } 37.     } 38.         let extfileName = fileName + "" + dirName 39.         let fileURL = URL(fileURLWithPath: (ArchiveURL!.absoluteString) + extfileName ).appendingPathExtension("json") 40.         do { 41.             let myJSONencoder = JSONEncoder() 42.             myJSONencoder.nonConformingFloatEncodingStrategy = .convertToString(positiveInfinity: "+Infinity", negativeInfinity: "-Infinity", nan: "NaN")   43.             let data = try myJSONencoder.encode(object) 44.                        try data.write(to: fileURL) 45.         } 46.         catch { print("265 Utility Functions.swift saveToJSON():", error) } 47. } 48. Thanks.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jan ’21
Reply to SwiftUI SceneKit populated but not displayed
OK, discovered the problem which lead to another. When porting my Delegate file from Swift to SwiftUI I had declared in a global variable file: var proton = SCNGeometry() ,which the var is. It is user selectable between: class Particle:SCNGeometry, SCNPhysicsContactDelegate {} and class WireFrameParticle:SCNGeometry, SCNPhysicsContactDelegate {} Experimenting, I found if I declare var proton = Particle() in the global var file, I get my desired SCNScene as SceneView. Likewise if var = WireFrameParticle(), I get the desired SCNScene as SceneView. When the user selects the "other" class from an options.toolbar where the var proton is reassigned, the program bombs, e.g., "Cannot assign WireFrameParticle to Particle". So, I modify my global var file to: var proton:SCNGeometry = Particle() The program no longer bombs but neither do I have the desired SCNScene in SceneView, again. There must be a way to declare/reassign the var proton, and have my scene too.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Feb ’21
Reply to App does not use my permissions to create dir
I have discovered an error that functioned in macOS but does not in iOS. Specifically, all the "atPath:" 's above are fed ".absoluteString" which must be ".path" in iOS. Correcting this eliminated the debugger statement: "Error Domain=NSCocoaErrorDomain Code=642 "You can’t save the file" Thanks to Leo Dabus Nov 23 '20 at 3:53 @ stackoverflow.com for pointing out the different results of each.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Feb ’21
Reply to SwiftUI SceneKit populated but not displayed
Not sure why it is working now, but here is what I did: First, I moved all scene initializing code into ContentView{},i.e., all node creation AND then included token nodes having drawn content (something to see). Secondly, it seems .temporalAntialiasingEnabled was/is incompatible with the simulated device of choice, so I removed it. Hope this helps.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Mar ’21
Reply to Integrate Metal/ObjC Tutorial into SwiftUI
I modified the "Graphics and Games Engineer " code thus; struct MetalView: UIViewRepresentable {     func makeCoordinator() - Coordinator {         Coordinator(self)     }     func makeUIView(context: UIViewRepresentableContextMetalView) - MTKView {         let renderer = Renderer() //. Renderer() is from Apple's Tutorial "CPU-GPU-Synchronization.xcodeproj"         let mtkView = MTKView() //        mtkView.delegate = context.coordinator         mtkView.delegate = renderer     //  if this is the last edit, compiles but gives white screen         mtkView.preferredFramesPerSecond = 60         mtkView.enableSetNeedsDisplay = true // if let metalDevice = MTLCreateSystemDefaultDevice() { // mtkView.device = metalDevice // } if let metalDevice = renderer._device { mtkView.device = metalDevice } ... line 18 gives: "Value of type 'Renderer' has no member '_device' " and so I am stuck. I had programmed the first 128K Mac using C, when its native language was Pascal. However, I had never used ObjectiveC until now and the syntax foils me. If an ObjC @implementation is as a Swift class, then why isn't _device a member?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Apr ’21
Reply to Integrate Metal/ObjC Tutorial into SwiftUI
Apple's Tutorial "CPU-GPU-Synchronization.xcodeproj" is readily available so I won't post any part of it. It is a stand-alone app that I want to launch from my SwiftUI app in some-or-any view. In "developer.apple.com/forums/thread/119112" a "Graphics and Games Engineer " kindly posted the code for creating the Coordinator, device, CommandQueue, etc. within SwiftUI code. What code/syntax is needed in either the objc tutorial code or the SwiftUI code to get the tutorial app to draw into the SwiftUI-created space? Or am I making this more complicated than it should be? I have tried creating a class in Swift with the Swift UIRepresentable as a var, then preface that class with "@objc" which should have made it available to the tutorial code, but it doesn't recognize it.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Apr ’21