Add swift test and use iOS extension