Swift api

Merge to master