As you know, dngPhotoDataRepresentation() API has deprecated at iOS 11 and later. So, We need to change the API to the fileDataRepresentation(). But How?

Almost codes are same previous. Here it is.

Initial:

Capture:

Store:

* NOTICE: DNG file can’t store into Photo Library. 

Usage: touch the “Capture” button to capture, then Activity view will be shown. That’s it.

 

Hope this will help you 😗 Project code is on GitHub.