XCTest/XCTest.h not found on old projects built in Xcode 6

后端 未结 10 2040
渐次进展
渐次进展 2020-12-04 06:52

I have a few projects I\'m trying to build with Xcode 6 Beta 2. The projects all have some type of library that uses XCTest (Kiwi/XCTest and Specta) that don\'t build in Xco

10条回答
  •  Happy的楠姐
    2020-12-04 07:28

    @squarefrog has the right answer but you'll have to keep doing that manually each time you update your pods :(

    If you add this to your podfile it will automatically add the extra path for you. E.g. if you wanted to add $(PLATFORM_DIR)/Developer/Library/Frameworks to FRAMEWORK_SEARCH_PATHS for Specta:

    post_install do |installer|
        target = installer.project.targets.find { |t| t.to_s == "Pods-Tests-Specta" }
        if (target)
            target.build_configurations.each do |config|
                s = config.build_settings['FRAMEWORK_SEARCH_PATHS']
                s = [ '$(inherited)' ] if s == nil;
                s.push('$(PLATFORM_DIR)/Developer/Library/Frameworks')
                config.build_settings['FRAMEWORK_SEARCH_PATHS'] = s
            end
        else
            puts "WARNING: Pods-Tests-Specta target not found"
        end
    end
    

提交回复
热议问题