How to Find Ratio and GCF of 2 numbers swift

Suppose my 2 numbers are 15 and 550.

I want to find ratio of this 2 numbers and to find ratio of 2 number first thing i need is GCF (Greatest Common Factor) but i don't know how to do this in swift.

GCF of above 2 number is 5

Once i found GCF than i can easily find ratio from below.

let a : Int = 15
let b : Int = 500

let strA = String((a/5))
let strB = String((b/5))

print(String.init(format: "%@:%@", strA, strB))

how can i calculate GCF?

Thanks in advance.