To apply a CIFilter to your photo, you first need to create a CIImage from your saved photo. You could use the init?(contentsOf: url) initializer for this. Then you can perform CIFilter operations on the CIImage.
To produce a new picture that you can save, you'll need to make a CIContext (with no destination), then use e.g. CIContext.createCGImage:fromRect
I've found these extensions to be useful: https://github.com/DigitalMasterpieces/CoreImageExtensions
Search for "write CGImage to file" for hints on how to do that. Note that neither CIImage nor CGImage are files, nor are they bitmap representations of images; they are abstract representations of "things that can be represented as an image" by their respective frameworks.
Good luck!
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: