Post

Replies

Boosts

Views

Activity

Reply to Xcode 13/14 Regression: Git Source Control: Cannot push, results in error "username does not match previous request"
This problem has plagued me for a bunch of years also. Recently I found the following "workaround": I would get the error if the config file for the project had a URL of the form: url = ssh:userid@//hostname/path-to-project however if I remove the userid from this string then Xcode will prompt me for the userid/password: url = ssh://hostname/path-to-project This also will work for cloning the project from within Xcode, just enter the string: ssh://hostname/path-to-project It might cause problems with issuing git commands from a command shell because it will use the current userid added to the string.
Mar ’23
Reply to SwiftUI app runs differently on hardware platforms
yes; I did get that error and changed the initial value to 1; when you ran on mac mini did it work properly (like my desktop) or not (like MacBook pro)? I made a few other changes to the code also (to display the hardware name, etc); updated code for Content View: (not sure how to edit original post) enum FFocus: Hashable { case pkNames case btnAssign case tfValue case btn1 case btn2 case noFocus } struct PZParm: Identifiable { var id = 0 var name = "" } struct ContentView: View { @State var psel:Int = 0 @State var tfVal = "Testing" @State var hw = "" @FocusState var hwFocus:FFocus? var body: some View { VStack { Text("Hardware test on " + hw).font(.title2) PPDefView(bSel: $psel) .focused($hwFocus, equals: .pkNames) TextField("testing", text:$tfVal) .frame(width: 400) .focused($hwFocus, equals: .tfValue) HStack { Button("Button1", action: {}) .frame(width: 150) .focused($hwFocus, equals: .btn1) Button("Button2", action: { tfVal = "" hwFocus = .tfValue }) .frame(width: 150) .focused($hwFocus, equals: .btn2) Button("New", action: { tfVal = "" psel = 0 hwFocus = .pkNames }) .frame(width: 150) .focused($hwFocus, equals: .btnAssign) } } .padding() // handle picker change .onChange(of: psel, { if psel > 0 {hwFocus = .tfValue} }) .onAppear(perform: { hw = hwn() hwFocus = .pkNames} ) } // generate hardware model name // using sysctlbyname // func hwn() -> String { var len = 0 sysctlbyname("hw.model", nil, &len, nil, 0) if len > 0 { var rawName = Array<UInt8>(repeating: 0, count: len) sysctlbyname("hw.model", &rawName, &len, nil, 0) if let s = String(bytes: rawName, encoding: .utf8) { return s } } return "Unknown" } } #Preview { ContentView() } struct PPDefView: View { @Binding var bSel:Int // test defs let pzparms:[PZParm] = [ PZParm.init(id:1, name:"Name1"), PZParm.init(id:2, name:"Name2"), PZParm.init(id:3, name:"Name3") ] // var body:some View { Picker(selection: $bSel, label: Text("Name")) { if bSel == 0 { Text("no selection").tag(0) } ForEach(pzparms) {Text($0.name)} }.frame(width: 250) } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jun ’24
Reply to SwiftUI app runs differently on hardware platforms
So I think I have found the reason for this difference in behavior on various hardware platforms. It has to do with a System Setting found in the Keyboard settings section named: Keyboard Navigation. if it is enabled then the program works as expected and if it is disabled then the program doesn't work as expected. In my case, for some reason, my Mac Studio desktop had this setting enabled (so it worked); my MacBook pro had the setting disabled (so it didn't work). When I enabled on MBP it worked; when I disabled on Mac Studio it stopped working.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jun ’24
Reply to Xcode copy release build signed target
Hi and thanks for your response. I am just a hobbyist developer who writes MacOS apps for personal use on my machines at home; as such I just sign them to run locally and do not really have a need to be involved in archiving and distribution build processes. Currently I will make changes, etc, create a "debug" build for testing; afterwards will create a "release" build that will be used for execution; after creating this "release" build I open the build folder while still in Xcode and manually copy the app to my application directory. My goal (as stated in the question I raised) is to somehow have that copying incorporated into the build process for the "release" build. It is not a big deal, just seemed like there should be a way to do it.
Mar ’25
Reply to Xcode copy release build signed target
ok; thanks for the response; not sure what would be the difference between following your recommendation and just manually copying from build folder from within Xcode (as i am currently doing) but will consider it. In the meantime I did come up with a semi-automated approach: (1) add a run script which tests for release build and emits a "cp ..." command to an external file (this works because that script runs with full Xcode build environment so can publish the build folder path) (2) manually execute that external file when I want to copy the build to applications folder
Mar ’25