error using cocoapods “use_frameworks!” SWIFT

后端 未结 3 605
长发绾君心
长发绾君心 2021-02-05 09:03

I had a clean swift project, using some cocoapods : Parse, AFNetworking and RESideMenu. I need to use STZPopupView pod, so I updated cocoapods with the last version:

         


        
相关标签:
3条回答
  • 2021-02-05 09:36

    I'm actually on the same problem. You could try this: http://www.innerexception.com/2015/05/cocoapods-useframeworks-means-bridging.html

    When using use_frameworks! in CocoaPods all of your pods will be used as frameworks, not only the swift pods. So you don't need an bridging header for this. Just import your pods into all swift files you need. In your example you have to write: import RESideMenu

    0 讨论(0)
  • 2021-02-05 09:44

    Try removing isam/ from the Objective-C Bridging Header and have only Swift-Bridging-Header.h

    Coming from personal experience, CocoaPods still have some issues when combining swift and Objective C frameworks. You can use Alamofire which is almost equivalent of AFNetworking for swift.

    Hope this helps.

    Edit : Also why use Objectice-C Parse in swift when you can directly use swift libraries.

    0 讨论(0)
  • 2021-02-05 09:51

    I had the same issue. I changed all my imports from #import "RESideMenu.h" to #import <RESideMenu/RESideMenu.h> for example.

    0 讨论(0)
提交回复
热议问题