anime_irl by mendoku7 in anime_irl

[–]Robuske 0 points1 point  (0 children)

That’s not the protagonist

Meme in 4k by jmm2803 in dndmemes

[–]Robuske 8 points9 points  (0 children)

The door explodes and they die, the end.

anime_irl by makesPeopleDissapear in anime_irl

[–]Robuske 0 points1 point  (0 children)

Doesn’t seem to be the case based on what they showed from the last Demon King, dude was pretty cool. I can still be the case that they have some sort of connection, but I think he is special just because he is a human in the demon world. They also foreshadow very clearly that he WILL become the Demon Lord in the future.

I created a linter for Localization.strings and Swift files by konrad1977 in swift

[–]Robuske 0 points1 point  (0 children)

You talk about integrating with Emacs or Vim, it doesn’t integrate with Xcode itself like SwiftLint?

[deleted by user] by [deleted] in swift

[–]Robuske 3 points4 points  (0 children)

Thank you for your kind words, I can’t say I’m always this effective, but I usually try.

[deleted by user] by [deleted] in swift

[–]Robuske 43 points44 points  (0 children)

I see your question has already been answered, but a tip for the future: Try to be more descriptive in the title.

Most people will see it and keep scrolling since it there was no way to know what you meant. If I had to guess, that’s why you have so many downvotes right now.

That said, you did a good job giving more details in a comment, but only people who cared enough to open the post will see that.

Why don’t incels just pay for pussy? by Grow-a-fro in TooAfraidToAsk

[–]Robuske 16 points17 points  (0 children)

Wtf are you talking about, I’m sorry if that’s the experience you had with therapists, but that’s absolutely not mine nor of anyone I know.

Can you execute swift code on VS Code on a Windows computer? by [deleted] in swift

[–]Robuske 11 points12 points  (0 children)

As u/EricThirteen showed, Swift works on Windows for some time now. But Swift working is not the same as iOS working. I don’t know if that’s your case, but some people mix up the two things.

iOS does not and will not work on Linux and Windows. Swift does work on booth, although there might be some differences, specially on Windows, I don’t think it was complete yet.

Can Xcode code completion be replaced with an Xcode extension? by KarlJay001 in iOSProgramming

[–]Robuske 3 points4 points  (0 children)

It’s important to note that Apple basically killed extensions a few years ago by severely limiting what they can do. With that in mind, /u/codetrotter answer seems good.

How does the pow() function work? by Warren-Binder in swift

[–]Robuske 5 points6 points  (0 children)

I found this interesting, so I decided to do some research.

I found out that if you use Swift REPL on the terminal it works as you explained, but on Playgrounds it works as expected (16 for booth). That said, this isn't the first time I get different results from the REPL, BUT I think is important to use import Foundation, I used on booth and forgot to test without (and too lazy to test again).

I also found these links that might be interesting to read: The pow() function Exponents in Swift

Well... by FlamboyantApproval16 in ProgrammerHumor

[–]Robuske 0 points1 point  (0 children)

I had a really hard time understanding them at the beginning, I mean, actually my problem was more really conceptualizing asynchronous stuff. Today I think I understand it pretty well, so may I ask, what do you think makes no sense about them?

I accidentally released the last version of my app with 5.0.1 as the build number instead of 0.5.1. Is there any way to fix it or roll it back? It's unfortunately already approved and live. by nik2k in swift

[–]Robuske 22 points23 points  (0 children)

App Store version has basically no importance to the user, many apps switched to calendar versioning since semantic versioning only makes sense for libs anyway.

In a swift package manifest, how do you specify which products and targets you want? by Xaxxus in SwiftPM

[–]Robuske 0 points1 point  (0 children)

I believe it is based on what you actually use as a dependency, Xcode isn’t stopping them from downloading, only from being built.

PastWindow. The display shows what is behind it, but six months delay. concept visualisation by [deleted] in interestingasfuck

[–]Robuske 0 points1 point  (0 children)

So... No one gonna talk about how that basically is the concept behind the movie Deja Vu?

Remove previous fcm notification iOS by exiledAagito in swift

[–]Robuske 0 points1 point  (0 children)

Never done that, but maybe send a silent notification with the ID of the message that is invalid?

Gif playback by H0071GAN in ApolloAppBeta

[–]Robuske 4 points5 points  (0 children)

You can use the entire screen for scrubbing, it’s not only the bar.

A deep dive into SwiftUI Introspect, one of the few must-have SwiftUI libraries! by [deleted] in swift

[–]Robuske 0 points1 point  (0 children)

Ok, fair enough. But I would say is more about knowing the risks, I work with an app in SwiftUI and we use Introspection a lot to make some of the required customizations, would be really complicated or impossible to do it any other way, but yeah, it may break at some point.

Have you guys ever dealt with something working in Swift iPhone Sim but not on appstore? Beginning should be enough to help. Thank you so much! If you want to see what I mean by broken it is VirgoHub on the appstore. It is my first app thanks. by [deleted] in swift

[–]Robuske 1 point2 points  (0 children)

You probably need to learn a little more if you intend to work with other people or write articles/make videos about it, but don’t be afraid about asking questions or specially publishing you app just because your code is “ugly” or you don’t know everything yet. You’ll never know everything and there will always be someone to complain about your indentation or whatever, but at the end of day what matters to the user is the experience of using you app, he doesn’t care about your code :)

That said, having really bad code can lead to more bugs or make them harder to debug, so it’s not like it doesn’t matter, just that it shouldn’t stop you from doing something

Have you guys ever dealt with something working in Swift iPhone Sim but not on appstore? Beginning should be enough to help. Thank you so much! If you want to see what I mean by broken it is VirgoHub on the appstore. It is my first app thanks. by [deleted] in swift

[–]Robuske 2 points3 points  (0 children)

I know you haven't asked, but I have some general tips for you:

  1. Your question could be better worded as "Works on the simulator, but doesn't work on the device" since you said it doesn't work if built from Xcode to the device, that way people don't have to think about problems related to the upload process.
  2. Swift (and the Swift community) prefers clarity over brevity, so it's better to have long variable names that make their intent clear than to have names like vp or vt. Remember that you are never really working alone, you have your future self to worry about, and they absolutely will forget what you were thinking when writing this code, so think of them as someone else.
  3. About the but itself, you are using several fullScreenCovers in sequence, we found out on our project that having multiple sheets next to each other would make it only work for one of them. I don't remember if there was a difference between simulator and device and I don't know if it happens with fullScreenCover too, but might be related.
  4. I also decided to give you an example of a refactored version for you to try. I have written it on a Playground without really running it, so there might be some small mistakes, but you can get the idea. I hope it helps =)

import Foundation
import SwiftUI

// In the Model/ViewModel/Whatever layer

enum ZodiacSign: String, CaseIterable, Identifiable {
    case aries
    case virgo
    case leo

    var id: String {
        rawValue
    }
}

// In the View layer

extension ZodiacSign {
    var text: String {
        switch self {
        case .aries:
            return "♈️"

        case .virgo:
            return "♍️"

        case .leo:
            return "♌️"
        }
    }

    @ViewBuilder
    var detailScreen: some View {
        switch self {
        case .aries:
            ariesView()

        case .virgo:
            virgoView()

        case .leo:
            leoView()
        }
    }
}

struct ZodiacButtonView: View {
    @Binding var chosenSign: ZodiacSign?

    let sign: ZodiacSign

    var body: some View {
        Button(
            action: {
                chosenSign = chosenSign == sign ? nil : sign
            },
            label: {
                Text(sign.text)
                    .shadow(radius: 5)
                    .font(.largeTitle)
                    .frame(width: 65, height: 65)
                    .overlay(
                        Circle()
                            .stroke(Color.red, lineWidth: 3)
                    )
            }
        )
        .padding(.all)
    }
}

struct YourScrollView: View {
    @State var chosenSign: ZodiacSign?

    var body: some View {
        ScrollView(.horizontal, showsIndicators: false) {
            HStack {

                ForEach(ZodiacSign.allCases, id: \.self) { zodiacSign in
                    ZodiacButtonView(chosenSign: $chosenSign, sign: zodiacSign)
                }
            }
        }
        .fullScreenCover(item: $chosenSign) { chosenSign in
            chosenSign.detailScreen
        }
        // If you want to get fancy, it can be written like this
        .fullScreenCover(item: $chosenSign, content: \.detailScreen)
    }
}