I attemped two solutions because the instructions didn't specify if I could use built-ins or not.
The first solution is non-linear time. It is big O of n squared as the function goes through the values of the first array for every value of the second array until it finds a value that is not in the first array.
The second solution is in linear time because it uses hashtable behind the scenes thanks to swift built in Set(). Assuming it is a good hashing function this will be big O of n where n is the length of the the second array.
I prefer the second function because it is more performant and easier to read. It can be used for any object as long as it is conforms to hashable protocol.