86

Not sure if appropriate for this community, or for !programming_horror@programming.dev.

all 31 comments
sorted by: hot top controversial new old
[-] adonis@kbin.social 34 points 10 months ago* (last edited 10 months ago)

I still don't understand why programmers are forced to use a specific tool, to write apps for a specific ecosystem.

i.e. writing a Flutter mobile app for Android and iOS. You can do everything in VSCode for the Android part incl. the apk-build.

But for iOS you're forced to use Xcode for implementing certain things like permissions, build and upload.

Nothing but headaches.

[-] bort@lemmy.sdf.org 15 points 10 months ago

Apple: our way or the highway

[-] lazyvar@programming.dev 7 points 10 months ago* (last edited 10 months ago)

But for iOS you’re forced to use Xcode for implementing certain things like permissions, build and upload.

You can do all that via VSCode as well if you so desire.

Permissions, configurations, etc. are essentially all just XML files and can be edited as such, building, running in simulator and uploading can all be done via CLI.

And if you're not comfortable doing it via the terminal in VSCode, you can also find some extensions.

Personally as a native dev I don't know why you'd want to of course, but to each their own.

[-] dohpaz42@lemmy.world 5 points 10 months ago

I wouldn't mind being locked into Xcode if Apple would beef it up and make it better.

[-] adonis@kbin.social 11 points 10 months ago

Yeah, for the 100 bucks they take each year, just to be able to publish apps on their platform, there's really no financial excuse for not making it better.

[-] loutr@sh.itjust.works 22 points 10 months ago

After a decade as a Java (and Kotlin) dev I recently got to work on an iOS app. The transition from Jetbrains products to Xcode has been painful, to say the least.

I tried appcode before it was retired, and it was a much better experience all around. I can't understand why Apple insists on maintaining this pile of crap instead of working with JB like Google.

[-] dohpaz42@lemmy.world 11 points 10 months ago

I can’t understand why Apple insists on maintaining this pile of crap...

I mean if they're using Xcode to maintain Xcode, then that's your answer.

[-] tamethecoach@lemmy.ca 2 points 10 months ago

I'm in the same boat, been working on Android apps personally and professionally for about 6 years and recently had to do some work for our iOS app and I've spent every minute wishing I could use a JetBrains product instead

[-] lazyvar@programming.dev 17 points 10 months ago* (last edited 10 months ago)

I think you might be misunderstanding what this does.

You did a search for symbol references that contain "User" ignoring cases.

When you do a search for symbol references this way, Xcode will return two things:

  1. A declaration of all the symbols containing "User" and/or some context surrounding the symbol (ignoring Case)
  2. Show any places where your code references the symbol

And it did just that.

The first three .swift files show references to symbols that contain "User".
The forth one, User.swift, is in and of itself a symbol that matches the query and has symbols inside itself.
The last one UserViewModel.swift is in itself a symbol as well and all the parts that are nested within that you've annotated with underscores and question marks, serve to give you context about the symbol "UserViewModel", hence the ellipses.

It's essentially telling you "Hey I've found this symbol UserViewModel, it starts with a var named username, has a bunch of stuff following that (i.e. …) then has an extension, then some more stuff (i.e. …) and then ends".

Without knowing what's inside UserViewModel.swift I can't tell if it goofed with giving you a typical declaration, but that doesn't change the fact that its trying to give you context about a valid search result, the symbol UserViewModel, so that you can figure out if that's the one you're looking for.

Keep in mind that variables are considered symbols as well, but in this instance I don't think that's what happened here, otherwise it would've been marked with a P instead of a C.

If this is not desired behavior then I suggest you switch from "Containing" to "Matching Word" or instead consider using the search bar at the bottom of the Symbol Navigator. Another option, if you're searching while going through code, is to right click on the symbol in your code and click Find > Find Selected Symbol in Workspace.

Lastly it might be an idea to go over the Xcode documentation as a refresher. This would be a good starting point.

That said, Apple clearly feels that things can be improved by clarifying, because in the current Xcode beta they've changed the option label from References to Symbols (and added a few more options).

[-] dohpaz42@lemmy.world 4 points 10 months ago

I'll be the first to admit that I am certainly no Xcode expert. So thank you for taking the time to explain how the reference/symbols search works.

Another option, if you’re searching while going through code, is to right click on the symbol in your code and click Find > Find Selected Symbol in Workspace.

Funny enough, that's what I did. Everything in the search window is what was selected by default in Xcode; probably why I was confused. I still contend it's not intuitive.

[-] seeaya@lemmy.world 1 points 10 months ago

Yeah not sure why Find Selected Symbol defaults to contains instead of matching. My search results get polluted with other symbols when I search for example MyStruct.image and MyStruct also has the property imageName.

[-] seeaya@lemmy.world 2 points 10 months ago

Happy to see those new options in Xcode 15. Those seem really useful.

[-] Aatube@kbin.social 6 points 10 months ago

Save for the "..." blank lines I see no problem with this. You just ran a Ctrl (command?) + F on everything that contains "User" ignoring case and it did exactly that.

[-] StarManta@lemmy.world 6 points 10 months ago

I see the blank lines being included is odd, is that it? Why are the other lines being underlined?

[-] dohpaz42@lemmy.world -4 points 10 months ago

Because two of them are strings, and one is a declaration of an extension. None of which are of type User.

[-] Aatube@kbin.social 8 points 10 months ago* (last edited 10 months ago)

All you searched was "User", ignoring case. You didn't search the type of user, so it correctly returned lines with "user" in it like "private var username"

[-] dohpaz42@lemmy.world -3 points 10 months ago

If what you're saying is true, that's an even more WTF because I'm searching for User references, and not the text "[Uu]ser".

[-] StarManta@lemmy.world 6 points 10 months ago

It’s plainly obvious in this screenshot that you’re just searching for the text “user”.

[-] dohpaz42@lemmy.world 1 points 10 months ago
[-] MaggiWuerze@feddit.de 1 points 10 months ago

Yeah, that's what "ignoring case" means

[-] Aatube@kbin.social 6 points 10 months ago

I'm pretty sure you're not doing what you think you're doing because of the "containing" right after the arrow. To search a symbol you usually select it, right click it, and then click on something.

[-] dohpaz42@lemmy.world 1 points 10 months ago

To search a symbol you usually select it, right click it, and then click on something.

Funny you say that... because that's what I did.

[-] Aatube@kbin.social 1 points 10 months ago* (last edited 10 months ago)

Weird, what was the something you clicked? It may be something wrong with that button instead of the search function, as there's "containing" after the arrow so it's not really a symbol search.

[-] dohpaz42@lemmy.world 1 points 10 months ago

As suggested by others, I changed the Containing to Matching Word and that helped tremendously.

[-] hdsrob@lemmy.world 2 points 10 months ago

Xcode seems to get worse with each release.

The really basic things that it's missing are frustrating too, like bookmarks. This has been a feature of every other IDE I've used since '98 when I started programing in VB6.

A few versions ago they removed the ability to tear a tab out of the IDE to have it open separately.

[-] meat_popsicle@kbin.social 2 points 10 months ago

A few versions ago they removed the ability to tear a tab out of the IDE to have it open separately.

WTF why? Do XCode devs not use their own product or something???

[-] orca@orcas.enjoying.yachts 0 points 10 months ago

I was actually looking to add Swift to my list of languages but if Xcode is this shitty, it’s kind of a deterrent.

[-] Aatube@kbin.social 1 points 10 months ago

You only need Xcode to Swift for Apple platforms

[-] dohpaz42@lemmy.world 1 points 10 months ago

Swift has its own problems. But don't let either of those facts stop you.

this post was submitted on 27 Jul 2023
86 points (85.8% liked)

Programmer Humor

17735 readers
26 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 11 months ago
MODERATORS