Awalz / SwiftyCam

A Snapchat Inspired iOS Camera Framework written in Swift
BSD 2-Clause "Simplified" License
2.08k stars 326 forks source link

videoPreviewLayer - Main Thread Checker - Video Not Recording #173

Closed ElliottDiaz closed 6 years ago

ElliottDiaz commented 6 years ago

I've so far attempted wrapping every instance of 'videoPreviewLayer' in the function DispatchQueue.main.async or sync throughout my code and as well unlocking and modifying the swiftycam pod files the same to solve the problem but haven't had any success.

The instantiation of a SwiftyViewController is wrapped within a DispatchQueue.main.async {}.

If I turn off UIMainThreadChecker the only thing that occurs is my captureButton grows then ungrows, and the method didFinishRecordingTo gets called. But no video is captured.

Any guidance toward a possible solution would be amazing, Thanks!

ElliottDiaz commented 6 years ago

Has anyone had the same problem as me? with videoPreviewLayer posing a cash when trying to record?

ElliottDiaz commented 6 years ago

Regardless of what I do, It is not possible to capture video as of iOS 11, swift 4. If anybody can point me in the right direction it would be extremely helpful!

ElliottDiaz commented 6 years ago

Issue was in not using 'Swift4' branch. Completely my fault. Thank you guys!

om-ha commented 6 years ago

@ElliottDiaz what about Swift 3.x users (3.3 for me).

Is there any solution for this? I'm getting a runtime thread warning.