Vatsal Manot Vatsal Manot - 1 year ago 72
iOS Question

Can't access Swift class from custom dynamic framework (Swift)

My test dynamic iOS framework

consists of a single class

However, even after declaring:

import XYZFramework

I am unable to access this class, with any attempts yielding the following error:

Use of unresolved identifier 'XYZ'

How do I resolve this issue?

Answer Source

Found the answer. I had to prefix my class declaration with the public modifier. So this:

class XYZ



public class XYZ


And as always, trashing the ~/Library/Developer/Xcode/DerivedData folder fixed any minor complications.

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