Swift framework error:Include of non-modular heade

2019-08-23 12:34发布

I create swift framework and pod 'AMap3DMap'. My podfile is that

platform :ios, '8.0'
target ‘mapFrameWork’ do
pod 'AMap3DMap'
pod 'AFNetworking' 
end

when it did finished but i found that error:

enter image description here

i set the

enter image description here

but it does't work. now what should i do?

3条回答
成全新的幸福
2楼-- · 2019-08-23 12:47

I solved it removing Modules folder from the framework.

  • Browse to your framework location which is present in the App Project using finder

  • Go inside Test.framework folder (In the above case it will be mapFrameWork.framework) & Delete Modules folder.

  • Clean and Re Build the app, it will solve the problem.

查看更多
你好瞎i
3楼-- · 2019-08-23 12:57

Go to project -> Build Settings under "Target" and set "Allow Non-modular Includes in Framework Modules" to YES.

Hope this will help.

查看更多
男人必须洒脱
4楼-- · 2019-08-23 12:58

Add the header file to the Framework's umbrella header, and then add it to the Headers section as Public. In the below image it shows how to add Reachability library.

enter image description here

查看更多
登录 后发表回答