Post

Replies

Boosts

Views

Activity

cd on terminal
When I'm in TERMINAL and I issue the cd command it says no such file or directory. I cut this from the terminal session: Last login: Tue Nov 12 20:10:57 on ttys000 The default interactive shell is now zsh. To update your account to use zsh, please run chsh -s /bin/zsh. For more details, please visit https://support.apple.com/kb/HT208050. iMac:~ robertsantovasco$ cd desktop iMac:desktop robertsantovasco$ cd L1 demo -bash: cd: L1: No such file or directory iMac:desktop robertsantovasco$ cd L1 -bash: cd: L1: No such file or directory iMac:desktop robertsantovasco$ cd L1 demo -bash: cd: L1: No such file or directory iMac:desktop robertsantovasco$ cd / iMac:/ robertsantovasco$ cd desktop -bash: cd: desktop: No such file or directory iMac:/ robertsantovasco$ cd L1 demo -bash: cd: L1: No such file or directory iMac:/ robertsantovasco$ cd L1 demo -bash: cd: L1: No such file or directory iMac:/ robertsantovasco$ cd desktop -bash: cd: desktop: No such file or directory iMac:/ robertsantovasco$ cd desktop -bash: cd: desktop: No such file or directory iMac:/ robertsantovasco$ CD desktop /usr/bin/CD: line 4: cd: desktop: No such file
5
0
664
Nov ’24
cocoapods
When I try to install cocoapods I get this error: [!] Oh no, an error occurred. Search for existing GitHub issues similar to yours: https://github.com/CocoaPods/CocoaPods/search?q=dlopen%28%2FLibrary%2FRuby%2FGems%2F2.6.0%2Fgems%2Fffi-1.12.2%2Flib%2Fffi_c.bundle%2C+0x0009%29%3A+tried%3A+%27%2FLibrary%2FRuby%2FGems%2F2.6.0%2Fgems%2Fffi-1.12.2%2Flib%2Fffi_c.bundle%27+%28mach-o+file%2C+but+is+an+incompatible+architecture+%28have+%27x86_64%27%2C+need+%27arm64e%27+or+%27arm64%27%29%29%2C+%27%2FSystem%2FVolumes%2FPreboot%2FCryptexes%2FOS%2FLibrary%2FRuby%2FGems%2F2.6.0%2Fgems%2Fffi-1.12.2%2Flib%2Fffi_c.bundle%27+%28no+such+file%29%2C+%27%2FLibrary%2FRuby%2FGems%2F2.6.0%2Fgems%2Fffi-1.12.2%2Flib%2Fffi_c.bundle%27+%28mach-o+file%2C+but+is+an+incompatible+architecture+%28have+%27x86_64%27%2C+need+%27arm64e%27+or+%27arm64%27%29%29+-+%2FLibrary%2FRuby%2FGems%2F2.6.0%2Fgems%2Fffi-1.12.2%2Flib%2Fffi_c.bundle&type=Issues If none exists, create a ticket, with the template displayed above, on: https://github.com/CocoaPods/CocoaPods/issues/new Be sure to first read the contributing guide for details on how to properly submit a ticket: https://github.com/CocoaPods/CocoaPods/blob/master/CONTRIBUTING.md Don't forget to anonymize any private data! Looking for related issues on cocoapods/cocoapods... Searching for inspections failed: undefined method `map' for nil:NilClass robertsantovasco@iMac L1 demo % I typed "install pod". There's pages of errors above that. Here is my podfile: platform :ios, '9.0' target 'L1 demo' do Comment the next line if you don't want to use dynamic frameworks use_frameworks! pod 'RealmSwift' end Please help. Thank you.
Topic: UI Frameworks SubTopic: SwiftUI
0
0
314
Nov ’24
Navigation View
How can I add navigation to an existing program. I coded this as per youtube video: var body: some View { NavigationView { VStack { NavigationLink(destination: viewdetail()) { Text("click") .frame(width: 300, height: 150, alignment: .center) .background(Color.gray) .foregroundColor(.black) } } } It doesn't work. If I comment out the rest of the program it works. I have VStacks and HStacks and functions after the navigation code. Please help.
2
0
275
Nov ’24
Checking for NIL
I have a program where the user enters 2 fields with numerics. If they accidently enter a letter the program crashes. How can I check for NIL without making the variable optional. If I make it optional I get an error in the Textfield. How can I test a Textfield for NIL? Please help.
4
0
356
Nov ’24
format percentages
I'm using XCODE with Swiftui. I want to know how I can format percentages in the program to whole numbers with a % sign without any decimal places to the screen. For instance if the program figures 33.3333 I want to print 33% to the screen. If I have 67.85762 in the program I want to print 67% (or 68% if it can be rounded) to the screen. Please help. Thanks
3
0
272
Dec ’24
navigation
I'm using xcode 16.1 with SwiftUI. I have a program that needs another screen. How can I add navigation? All the youtube videos show you how to add navigation to a new program. Is there a video that shows you how to add navigation to an existing program? Any instruction would help. Thanks
Topic: UI Frameworks SubTopic: SwiftUI
2
0
228
Dec ’24
arrays
I'm using xcode 16.1 withSwiftUI. I want to know how to call a function passing in an array. Also I need to know how to declare the function receiving the array. I currently have: func myfunc(costa: [Double] { some code } I call it like this: myfunc(costa:[ ]) It's an array of Doubles. I don't get any errors but the array is always empty even though it's not empty on the sending side. Please help. Thank you.
2
0
290
Dec ’24
percentages
I want to know how to format doubles. In the program I have 4.3333 I just want to print 4 to the screen. I just want to print whole numbers. I'm using Swiftui with xcode. Please help. Thank you.
3
0
263
Dec ’24
array
I'm using xcode 16.1 withSwift. I want to know how to call a function passing in an array. Also I need to know how to declare the function receiving the array. I currently have: func myfunc(costa: [Double]) { } I call it like this: myfunc(costa:[ ]) It's an array of Doubles. I don't get any errors but the array is always empty. Please help. Thank you.
3
0
272
Dec ’24
Cannot find 'detailline' in scope
I'm using xcode 16 with swift. I'm trying to call a function in another file. It used to work. Now I'm getting: Cannot find 'detailline' in scope. Detailline is the function I'm calling. I just added variables to the top. I have since deleted them. Please help.
9
0
493
Dec ’24
cannot find in scope
struct viewdetail: View { @State var text1:String = "" @State var tip1:String = "" @State var text23:String = "" @State var tip23:String = "" var body: some View { Text(text1);Text(tip1);Text(text23);Text(tip23) } } func detailline(costa:inout [Double],tipa:inout [Double]) { print(costa,tipa) text1 = "125" Cannot find 'text1' in scope print("detail") }
38
0
1.5k
Dec ’24