Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Crashlytics file not found

Recently opened a project that I had compiled and submitted to Apple.

I haven't touched it for a couple of months but I'm getting this odd compile error at:

#import <Crashlytics/Crashlytics.h>

The error reads:

'Crashlytics/Crashlytics.h' file not found

Clearly the framework can't be found but I'm puzzled as to why, when the project was working a few months ago, it's suddenly stopped.

Any suggestions why?

Xcode: 4.6.3 Mac OS X: 10.8.4

like image 471
Snowcrash Avatar asked Jul 19 '13 19:07

Snowcrash


3 Answers

Just add $(SRCROOT) to the Framework Search Paths in Project Build Settings (Search Paths).

Crashlytics installation process drops its Crashlytics.framework to your project folder (or creates the symlink).

If you moved Crashlytics.framework somewhere deeper in the project folder hierarchy - set 'recursive' to the right or just point directly to its parent folder in Header Search Paths:

$(SRCROOT)/Path/to/the/folder/containing/Crashlytics.framework

like image 71
Lukasz Avatar answered Oct 21 '22 04:10

Lukasz


Delete frameworks from you project and disk. Check that you have the newest version of Fabric plugin.

Copy frameworks from plugin folder to desktop with this commands:

ditto -xk ~/Library/Caches/com.crashlytics.mac/5b91b14e832a7b1c29441ec5ba109810/sdks/ios/com.twitter.crashlytics.ios-default.zip ~/Desktop/

ditto -xk ~/Library/Caches/com.crashlytics.mac/5b91b14e832a7b1c29441ec5ba109810/sdks/ios/io.fabric.sdk.ios-default.zip ~/Desktop/

Add frameworks from desktop to your project.

Info from: https://twittercommunity.com/t/error-upgrading-from-crashlytics-on-ios/36196/2

like image 25
Wez Sie Tato Avatar answered Oct 21 '22 03:10

Wez Sie Tato


I'd recommend just using CocoaPods to add the Crashlytics framework. No need to care about paths anymore.

Podfile:

pod 'Crashlytics', '~> 3.4.1'

Script Build Phase for dSYM Upload:

./Pods/Crashlytics/iOS/Crashlytics.framework/run <your_crashlytics_id>

Import:

#import <Crashlytics/Crashlytics.h>
like image 21
fluidsonic Avatar answered Oct 21 '22 04:10

fluidsonic