Cocoalumberjack: Fail to find CocoaLumberjack.h

Created on 1 Dec 2014  Â·  29Comments  Â·  Source: CocoaLumberjack/CocoaLumberjack

When install CocoaLumberjack via cocoapods:

pod 'CocoaLumberjack', '2.0.0-beta4'

and then add to my .pch file this line:

#import <CocoaLumberjack/CocoaLumberjack.h>

its says that the file can't be found. And its there and even xcode autocomplete the route.

I don't found any related problem in the closed issues.

Most helpful comment

Was same problem.
Solved by removing Pod folder, cleaning a project, removing DerivedData folder, then pod install.

All 29 comments

I usually make a Clean Build Folder + Delete DerivedData folder + Quit Xcode + Clean again to be sure, when my Pods headers change a lot.

Nope, this didn't solve the problem. Works fine if i add #import <CocoaLumberjack/CocoaLumberjack.h> to each .hthat will use CocoaLumberjack.

Doesn't make much sense. Maybe your prefix file is not configured properly. You can try checking the Preprocessed code using the Assistant Editor.

2014-12-02 14 58 07

It seems like "CocoaLumberjack.h" is missing. I can't even find it in the Pods folders. This is a new project with the latest pod version.

There is something wrong with your installation. Con you try deleting Pods.lock and the Pods directory and do a fresh pod install?

Do you get this for your non-main Target (for instance the Tests one) ?
I had a similar error and had to click on the project, in the Info tab, in the Configurations section set Pods.debug as the configuration set for each of the targets.

In case you have more than one target in your project you need to set link_with in your Podfile. Otherwise only your first target will be configured with CocoaPods.

@nexon does this issue still apply or did you manage to get passed it?

I have the same problem, where should be located CocoaLumberjack.h after pod install? I can't find it in Pods folder.

It should be inside the Default files group of the Pods project inside your workspace.

@ivo-ustr-00002 any updates? Does this answer your question?

Same problem

It should be inside the Default files group of the Pods project inside your workspace.

Yes - it is there. But anyway got an error 'CocoaLumberjack/CocoaLumberjack.h' file not found

Please try to delete de DerivedData folder for the Xcode project. If that doesn't help, remote Lumberjack from the Podfile, do a pod update/install, then add it back and redo the pod update/install. This way you would refresh the Pods installation.

Sorry - false alarm. Problem was not in CocoaLumberjack. For some reasons cocoapods was not able to find header files. Fixed by manually add cocoapods header files directory to project's Header Search Path option.

Glad to hear that, but not a good idea to do that manually, better clean/update CocoaPods.

Tried it, but without success. Seems CocoaPods has some issues with generation of correct project workspace file.

I would be surprised as that is one of the main features of CocoaPods. You should try reporting the issue.

I have this issue too.

1.pod version 0.36.0
2.podfile

# Uncomment this line to define a global platform for your project
# platform :ios, '6.0'
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!
target 'myTarget' do
       pod 'CocoaLumberjack'
end
target 'myTargetTests' do
end

4.podfile.lock

PODS:
  - CocoaLumberjack (2.0.0):
    - CocoaLumberjack/Default (= 2.0.0)
    - CocoaLumberjack/Extensions (= 2.0.0)
  - CocoaLumberjack/Core (2.0.0)
  - CocoaLumberjack/Default (2.0.0):
    - CocoaLumberjack/Core
  - CocoaLumberjack/Extensions (2.0.0):
    - CocoaLumberjack/Default
DEPENDENCIES:
  - CocoaLumberjack
SPEC CHECKSUMS:
  CocoaLumberjack: fd2b1031c6c4e0f08b5ea928ef677fa0a5de517d
COCOAPODS: 0.36.0

@inix could you create a demo project with this issue so we can investigate it further?

@bpoplauschi
hi,I finally resolve it by delete podfile.lock and pod install again.
I do not know how to repeat this issue steadily.

Great, @inix

I have the same problem...And,I still can not resolve it.

I have had the same problem and was too unable to resolve it until I changed my podfile from pod 'CocoaLumberjack' to pod 'CocoaLumberjack', '~> 2.0'. Cocoapods did not seem to load the correct version of CocoaLumberjack, before specifying a version number.

There's no "correct" version for CocoaPods. If unspecified it uses the latest but we had some compatibility issues with 2.0.1.

There is a more correct version. If you're importing Cocoalumberjack.h you need to be using at least 2.0. And for my case cocoapods did not use the latest version when leaving the version number unspecified.

Sent from my iPhone

On 17 Sep 2015, at 15:45, Ernesto Rivera [email protected] wrote:

There's no "correct" version for CocoaPods. If unspecified it uses the latest but we had some compatibility issues with 2.0.1.

—
Reply to this email directly or view it on GitHub.

still have the problem

Was same problem.
Solved by removing Pod folder, cleaning a project, removing DerivedData folder, then pod install.

in React native this resolved here => Found it. You have to open the xcode workspace, not the project.

I had the same issue but only for iOS simulator. For my iPhone there were no trouble to run the app. The issue appeared because there was no correct valid cpu architecture for a simulator in my project.
Have a look here

Was this page helpful?
0 / 5 - 0 ratings