rob8989 rob8989 - 4 years ago 108
iOS Question

Can't access PHImageManger (swift 3 xcode)

I can't seem to access PHImageManager in xcode. Is this a package I need to download or something along those lines? Or is this not accessible in the latest version of xcode?

let imgManager = PHImageManager.defaultManager()

This simply gives me an error "use of unresolved identifier: PHImageManager"

Answer Source

All you have to do is add this to the top of your class:

import Photos
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download