Can't find headers for GoogleAnalytics-iOS-SDK with Cocoapods 0.37, Swift, frameworks

前端 未结 4 1394
独厮守ぢ
独厮守ぢ 2021-02-05 09:24

Using cocoa pods 0.37.0 in a Swift project, with use_frameworks! set in the podfile, I am unable to access the header files for the GoogleAnalytics-iOS-SDK pod.

How shou

4条回答
  •  梦毁少年i
    2021-02-05 10:14

    Another trick is to add long relative path(s) to the bridging header.

    This avoids having to make changes to project settings which may be overridden next time you run `pod install':

    #import "../../Pods/GoogleAnalytics/Headers/Public/GAI.h"
    #import "../../Pods/GoogleAnalytics/Headers/Public/GAIFields.h"
    #import "../../Pods/GoogleAnalytics/Headers/Public/GAIDictionaryBuilder.h"
    

    It also works when running your unit tests too, which another solution I tried didn't.

提交回复
热议问题