Tried the following link
https://developer.apple.com/forums/thread/713409
but could'nt succeed.
Creating spritekit project and using the following link was able to achieve the task