Search code examples
ioschartscocoapodslinker-errorsxcode10

Cocoapods 'Charts' Installation Issue


I have spent the last couple hours trying to resolve this one, seemingly simple, bug. I am just trying to install the 'Charts' framework using Cocoapods. I am using Xcode 10 and Objective-C (the framework is largely written in Swift).

For the sake of testing, I have made my podfile extremely simple:

platform :ios, '9.0'

target 'News Aggregator' do

     pod 'Charts'

     target 'News AggregatorTests' do
         inherit! :search_paths
     end

      target 'News AggregatorUITests' do
          inherit! :search_paths
       end

end

Running pod-install yields no errors. However, when I try to compile from inside the workspace, I get the following warnings/errors: enter image description here

I have noticed that my Framework and Header Search paths are empty, which could be the problem. Why aren't they automatically being set? Also, I cannot seem to find a Charts.framework file in my directory...is that an issue?

Things I have tried: 1) Cleaning the build folder, 2) Clearing Derived Data folder, 3) Manually adding framework and header search paths (although I likely did this improperly), 4) deleting and reinstalling the pod file and corresponding folders, and 5) running "pod deintegrate". Nothing seems to be working.


Solution

  • You are getting this error may be because of bridging header issue.

    Let XCode take care it for you.

    To fix this your issue follow the steps

    1) Create new XCode project with OBJC lang.

    2) Create new Class with Swift Lang. Selected

    3) Xcode will prompt you alert to add bridging header

    4) Now Init pod and install it.

    Hope it is helpful to you and others :)