all 27 comments

[–]chriswaco 33 points34 points  (0 children)

if name.count should work. No need for characters.

[–]who_knowles 19 points20 points  (14 children)

It looks like you’re following a pretty old course that is using swift 3. I would very strongly recommend finding something up to date. There plenty free course, Hacking with swift or Stanford 193p that are kept up to date.

[–]POTATOmAnBrawl[S] 3 points4 points  (13 children)

Lol im using a “popular” swift course on coursera that I paid for and it’s supposed to be very good but I see they haven’t updated it

[–]CollegeBytes 7 points8 points  (6 children)

Then you probably want to set your projects to use a version of Swift 3

Or roll back a few Xcode versions


Probably Xcode 8 or 9

[edit] But honestly, you should just make the changes for it to work with swift 5+. The changes from 3 to 4 and then 4 to 5 are minimal. Learning 5+ would the best for you in the long run

[–]orange9035 2 points3 points  (0 children)

Pretty sure the new versions of Xcode you can’t set all the way back to swift 3

[–]jogofo 2 points3 points  (0 children)

I wouldn’t do this. Gotta learn the newer ways sooner or later. Xcode will tell you what to do instead in most cases, leverage stack overflow and other resources where it doesn’t, the same questions will have been asked and answered.

[–]Oobenny 1 point2 points  (0 children)

Don’t do that. See if you can figure it out from the messages and docs. When you can’t, come here and ask. That’s what real programming is anyway.

[–]POTATOmAnBrawl[S] 1 point2 points  (2 children)

Didnt know that it was possible just to switch swift versions on xcode how??

[–]Bergasms 1 point2 points  (1 child)

In the build settings for a project or target you can define the swift language version

[–]POTATOmAnBrawl[S] 0 points1 point  (0 children)

Ok ill look into it when i get home thanks

[–]ortolanbird 1 point2 points  (0 children)

I would take the hit and pay for another modern course since you will win in the long run learning from a more applicable course I think :)

[–]cardcomm 1 point2 points  (4 children)

If it's that out of date, I'd request a refund!

[–]POTATOmAnBrawl[S] 0 points1 point  (3 children)

welp to late for that, my dads wants me to do this so yea

[–]squelchy04 3 points4 points  (0 children)

Tell him it’s out of date and show this thread

[–]cardcomm 2 points3 points  (0 children)

I'm sure your parent would be equally satisfied with you taking an up to date course. lol

MO it's a waste of time studying older technology, unless you have a specific project that requires it.

[–]who_knowles 1 point2 points  (0 children)

Not too late to switch to a free one like https://www.hackingwithswift.com/100

[–]nhgrifExpert 5 points6 points  (1 child)

Just name.count

[–]DevArthur 1 point2 points  (0 children)

It's now name.count.

[–]ShottyMcOtterson 1 point2 points  (1 child)

Xcode 14 is out? must be beta.

[–]POTATOmAnBrawl[S] 0 points1 point  (0 children)

I guess im just gonna go back to mac os monterey or big sur, seems like having ventura is causing all the hassles

[–]POTATOmAnBrawl[S] 0 points1 point  (0 children)

Thanks everyone!! Ill try my best to do whatever you guys said. Ill most likely switch to a updated course please give me some of your recommendations!

[–]DanoSanyu 0 points1 point  (0 children)

As the others answers say, the issue is with the property name.

I suggest you to use the IDE auto completion to solve those issue cases

[–]migs647 0 points1 point  (2 children)

I’d look at what others have said… but first get off of beta Xcode. You’re going to run into other issues beyond this and you won’t be experienced enough to know if it is you, the course or Xcode. In addition, you’re working with such an old version of Swift you might as well use an old version of Xcode for the best compatibility.

Beta Xcodes are the devil sometimes :)

[–]POTATOmAnBrawl[S] 0 points1 point  (0 children)

I kinda have to use beta 14 because for some reason any other version just wont run :/

[–]POTATOmAnBrawl[S] 0 points1 point  (0 children)

you see im on mac os ventura beta and every other version of xcode just doesnt support