X is not a member type of Y

后端 未结 6 1704
难免孤独
难免孤独 2021-02-13 05:36

I\'m having staring issues with Module name spacing in a swift project.

I\'ve tried this in a new project and everything works fine:

I have 2 modules with which co

6条回答
  •  無奈伤痛
    2021-02-13 05:54

    When using an xcframework that depends on another framework, the X is not a member of type Y will also happen for the Framework it depends on when writing an extensions that wraps, for example, delegate methods

    Example: Framework Foo depends on Bar and need to conform to DataDelegate.

    class Foo {
        ...
    }
    
    extension Foo : Bar.DataDelegate {
        ...
    }
    

    Everything during compiling will go as planned and the xcframework will be generated. Once you add it to your App along with the dependancy framework Bar and try to build it you will get DataDelegate is not a member of type Bar.

提交回复
热议问题