Im getting this error message, is there a way around it?

im following a tutorial and im making a lock screen that has 4 digits. each digit when entered fills in a circle. there are four circles. right now im at the part where im coding the circles are white until my passcode count is greater than my index. from what im gathering, this newer version doesent like “>” symbol.
the full error messege is as follows

"Type ‘(UnsafePointer?, Int32) → UnsafeMutablePointer?’ (aka ‘(Optional<UnsafePointer>, Int32) → Optional<UnsafeMutablePointer>’) cannot conform to ‘BinaryInteger’ "

is there any way around this?

here is the full code as follows

import SwiftUI

struct PasscodeIndicatorView: View {

@Binding var passcode: String
var body: some View {
    HStack(spacing: 32) {
        ForEach(0 ..< 4) { Index in
            Circle()
                .fill(passcode.count > index ? .primary : Color(.white))
                .frame(width: 20, height:20)
                .overlay {
                    Circle()
                        .stroke(.black, lineWidth: 1.0)
                }
            
            
        }
    }
}

}

#Preview {
PasscodeIndicatorView(passcode: .constant(“”))
}

Update: I figured it out. appearntly xcode wanted me to capitalize the i in index. im leaving this here incase anyone else runs into this

Using your code the error comes up on the line:

.fill(passcode.count > index ? .primary : Color(.white))

as:

Type '(UnsafePointer<CChar>?, Int32) -> UnsafeMutablePointer<CChar>?' (aka '(Optional<UnsafePointer<Int8>>, Int32) -> Optional<UnsafeMutablePointer<Int8>>') cannot conform to 'BinaryInteger'

which is because you have used the the parameter name Index (with the uppercase I) rather than index.

This code works:

struct PasscodeIndicatorView: View {
    @Binding var passcode: String

    var body: some View {
        HStack(spacing: 32) {
            ForEach(0 ..< 4) { index in
                Circle()
                    .fill(passcode.count > index ? .primary : Color(.white))
                    .frame(width: 20, height:20)
                    .overlay {
                        Circle()
                            .stroke(.black, lineWidth: 1.0)
                    }
            }
        }
    }
}