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

后端 未结 2 1952
予麋鹿
予麋鹿 2021-01-03 18:20

My test dynamic iOS framework XYZFramework consists of a single class XYZ.

However, even after declaring:

import XYZFramew         


        
2条回答
  •  醉酒成梦
    2021-01-03 18:37

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

    class XYZ {
    
    }
    

    became:

    public class XYZ {
    
    }
    

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

提交回复
热议问题