Xcode Unit Testing with Cocoapods

前端 未结 14 1125
有刺的猬
有刺的猬 2020-12-07 11:52

I\'ve been banging my head against a wall with this for the last few days but despite multiple Google/SO/Github searches I can\'t find a resolution to the issues I\'m having

14条回答
  •  太阳男子
    2020-12-07 12:04

    The issue is that Firebase does something special with the Header Search Paths after CocoaPods generates its own value for the setting so CocoaPods doesn't pick up on this change in order to carry it over to the test target. You can solve this one of two ways:

    1. Locate MyAppTests..xcconfig in the file navigator and add the following to HEADER_SEARCH_PATHS:

      ${PODS_ROOT}/Firebase/Analytics/Sources [*]

    2. Find the setting for Header Search Paths in Build Settings and add that same value as in option 1 to the list. You shouldn't need to set it as recursive.

    * As per AKM's comment, this changed to ${PODS_ROOT}/Firebase/Core/Sources in version 3.14.0

提交回复
热议问题