I saw below question to use \'captureStillImageAsynchronouslyFromConnection\' function in swift:
How to convert code AVFoundation objective c to Swift?
@Jack and @Christian's solutions worked for me.
I was not careful enough to import CoreMedia.
I never used this framework before, and did not know if the problem was due to not having imported a correct framework.
Thank you for your help!