Vatsal Manot Vatsal Manot - 7 months ago 43
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?


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.