Using cocoapods without use_frameworks! in quick

According to this tutorial, we should add use_frameworks!to Podfileto the Swift project. But how to use third-party code .min the same project?

One possible way:

  • DO NOT add use_frameworks!toPodfile
  • Import header ...-Bridging-Header.h
  • Then I can use third-party code in the .swift and .m files

But when I try to import the title into ...-Bridging-Header.h, it just throws an error *.h file not found, how to fix this problem?

+5
source share
1 answer

Past

CocoaPods 1.4.x ( ) CocoaPods Swift use_frameworks!.

: 1.x.x

, CocoaPods 1.xx ( 1.4.0), use_frameworks! Swift ObjC: :

  • Swift Objective-C.
  • Objective-C Swift.

: 1.5.x

CocoaPods 1.5.0 . (sudo gem install cocoapods) use_frameworks! .


, iOS:

  • Apple Xcode 10.1, , CocoaPods 1.6.0, CocoaPods.
  • Apple Xcode 11 2020 , CocoaPods 1.7.5 , xcodeproj 1.13.0 .
+11

Source: https://habr.com/ru/post/1614226/


All Articles