Playing Card in Swift
In addition to what @Carpsen90 said:

No get... accessor methods

Unlike some other programming languages, you don't define accessor methods for the properties, these are implicitly created by the compiler. If suit and rank are constant properties (initialized once and never mutated) then it is simply

struct Card {
    let rank: Int
    let suit: Int

    // ...
}


For properties which are publicly read-only, but internally read-write, it is

 struct Card {
    private(set) var rank: Int
    private(set) var suit: Int

    // ...
}


That makes the compareRank/Suit methods obsolete, because you can directly  test

if card1.rank == card2.rank { ... }


etc.