Importing private submodule in swift file caused me error

Viewed 335

Here is the modulemap file :

framework module Framework
{
    requires objc, objc_arc

    umbrella header "Header.h"

    export *
    module * { export * }

    explicit framework module Private
    {
        umbrella header "Header-Private.h"
    }
}

how i imported it in swift file :

import Framework.Private

Now i've got this error :

@import Framework.Private; @import of module 'Framework.Private' in implementation of 'Framework'; use #import

1 Answers

i think module map file will have some change

framework module <ProjectName> {
    umbrella header "ProjectName.h"
    export *
    module * { export * }

    explicit module ProjectName_Private {
        private header “<headerName>.h”

        link “staticLibName” // external static Library 
        export *
    }
}
Related