Monday, February 5, 2024
HomeiOS Developmentios - Easy manner to make use of digicam to take a...

ios – Easy manner to make use of digicam to take a photograph in swift


I am curious, is there a quite simple, ideally SwiftUI-native, iOS/iPadOS API accessible that may enable the consumer to take a photograph that shall be used instantly in my App (without having to go to digicam roll)? I’ve discovered Apple’s “tutorial” on Capturing and Saving a Picture, and I do know there may be a minimum of one Stack Overflow reply on this space, however these are too convoluted in comparison with my expectations. I am on the lookout for an API like:

let pathToPhoto = MyFramework_takePhoto()

Possibly it might return one thing in RAM as an alternative of on disk. Possibly there could be non-compulsory parameters. However the level is, for a lot of use-cases, it should be this straightforward to get a photograph from no matter digicam is hooked up to the gadget. I do not thoughts if the API has full management of my App’s important thread whereas the digicam is lively. I think about one thing just like the behaviour within the Messages app, once you select “Digicam” from the “+” button.

Having simply checked a couple of third-party apps that take pictures, I can see that they’ve a customized interface for taking pictures, so I believe I do know what the reply goes to be, as far as Apple API is anxious. 🙁
But when Apple does not provide such an API, is there a Swift Bundle that does?

I’ve regarded within the Swift Bundle Index, and Digicam Supervisor looks like it is likely to be a good selection. Any steering on this space could be appreciated!



Supply hyperlink

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments