Google/Analytics.h file not found when adding to AppDelegate

前端 未结 8 1595
迷失自我
迷失自我 2020-12-30 04:06

I am trying to integrate Google Analytics in my ios project using Cocoapods. However, after following this for the steps till adding configuration file to my project, when i

8条回答
  •  南方客
    南方客 (楼主)
    2020-12-30 05:02

    When you add $(SRCROOT)/Pods/GoogleAnalytics to User Header Search Paths in Build Settings, also select recursive option. It will allow your project to search in GoogleAnalytics and all of its sub-directories.

    UPDATED: I have tried the tutorial and it works fine without any extra step. My pod version is 0.35.0. When you create configuration file, remember to enable GoogleAnalytics service.

    UPDATED: As @RajatTalwar pointed out, you also need to add $(SRCROOT)/Pods/Google with recursive option. Then include the #import "Analytics.h" instead of #import

提交回复
热议问题