Crashlytics file not found

Recently, a project was opened, which I compiled and sent to Apple.

I haven't touched it for a couple of months, but I get this odd compilation error:

#import <Crashlytics/Crashlytics.h> 

Mistake:

 'Crashlytics/Crashlytics.h' file not found 

Obviously, the framework cannot be found, but I am puzzled by why, when the project worked a few months ago, it suddenly stopped.

Any suggestions why?

Xcode: 4.6.3 Mac OS X: 10.8.4

+55
xcode crashlytics
Jul 19 '13 at 19:41
source share
13 answers

Just add $(SRCROOT) in the Search paths in your pocket in the project build settings (search paths).

The Crashlytics installation process transfers it to Crashlytics.framework in your project folder (or creates a symbolic link).

If you moved Crashlytics.framework somewhere deeper into the project folder hierarchy, set โ€œrecursiveโ€ to the right or simply point directly to your parent folder in Header Search Paths :

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

+83
Aug 29 '13 at 9:08 on
source share

Remove the frameworks from the project and the drive. Make sure you have the latest version of the Fabric plugin installed.

Copy the frames from the plugin folder to the desktop using the following 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 the desktop to your project.

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

+25
May 13 '15 at 12:02
source share

I would recommend using CocoaPods to add a Crashlytics framework. No more worrying about paths.

Podfile:

 pod 'Crashlytics', '~> 3.4.1' 

Script Build Phase for dSYM Download:

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

Import

 #import <Crashlytics/Crashlytics.h> 
+20
01 Oct '14 at 7:46
source share

For me it worked:

Extract the structure and crash from your project and delete the files from the disk for our project.

Comment out the lines in your appdelegate.m file if you added them for the following:

 import Fabric/Fabric.h import Crashlytics/Crashlytics.h 

and

 [Fabric with:@[CrashlyticsKit]]; 

In the Fabric application, select New Application and select the Xcode project file

Restore the build script and create as per the instructions. The build step is why you need to comment on the lines above - it will not work if you leave these lines.

After starting the build script, she will offer you to drag the frameworks from the application window into her project navigator. This will copy the latest versions of its frameworks (including .h files) into your project

I tried to manually download and copy from other projects, but this is the only way to recover after losing the framework files for the application.

+4
Jun 21 '15 at 1:08
source share

In my case, the Framework was in the project folder, but not in Project Navigator. I dragged it into the project and it worked fine.

+3
01 Oct '14 at 7:30
source share

I had a problem with running distributed commands (via github) after validating and then validating Crashlytics . Crashlytics.framework will have only one folder inside - "Versions". You need to save the version of the content inside Crashlytics.framework to another location, and then copy them to Crashlytics.framework later.

+1
Oct 13 '14 at 18:04
source share

Remove Crashlytics.framework from the project and drive . Copy and add it again. It helped me.

+1
Mar 27 '15 at 12:26
source share

In my case, I switched from an old Crashlytics installation through a Mac app in Cocoapods. Many answers to this question recommend completely deleting everything and starting all over again. I started to do this and noticed a discrepancy between the code found in the Fabric Documentation and the code specified in the Fabric application, at the step where it tells you what to copy into its working phase Script.

The fabric documentation contains double quotes surrounding the entire string: "${PODS_ROOT}/Fabric/Fabric.framework/run <Your_API_Key> <Your_Build_Secret>"

There are only two quotes in the Fabric application along the path to the run executable: "${PODS_ROOT}/Fabric/Fabric.framework/run" <Your_API_Key> <Your_Build_Secret>

So, before you delete everything and get started, try updating Run Script Build Phase to this:

"${PODS_ROOT}/Fabric/Fabric.framework/run" <Your_API_Key> <Your_Build_Secret>

+1
Aug 26 '15 at 18:11
source share

I changed the name of the working folder and Craslytics fails. Check this in the build settings (search path).

Good luck

0
Nov 06 '13 at 10:50
source share

I tried to play the framework search path and move and re-attach the framework file; checked the build settings (Link binary with libraries section), but the error persisted.

Finally, I reinstalled the framework, which takes only 2-3 minutes. The problem may be due to the fact that you moved Crashlytics.framework to another subfolder from the root directory, but I'm not sure about the specific reason.

  • Remove all Crashlytics
  • Launch the crashlytics application, log in and select your project.
  • Add run script
  • Drag and drop the .framework file (I saved it in the root folder)
  • Add import and startWithAPIKey back
0
Jan 20 '15 at 14:42
source share
  • Completely uninstall Crashlytics Frameworks on your proj enable shell script in App Build Phases Run Script.
  • Reinstall the fabric, following the instructions, everything will be in order.
0
Jun 12 '15 at 8:15
source share

I previously upgraded to Fabric and had no problems. After a couple of days, I re-opened the same project and had the missing crashlytics.h problem.

I couldnโ€™t just reinstall from the plugin due to an uncompiled project (I had so many CLS_LOG messages and links to the missing crashlytics.h file in my project, it would take a lot of time to remove them just to allow the assembly to work - refactoring does not will work on CLS_LOG).

So, instead, I removed crashlytics.framework from my project and did the following to restore it directly from the plug-in:

  • Download the Fabric plugin again and double-click the zip file to unzip the Fabric application.

  • Right-click the Fabric and Show Package Contents icon

  • Copy the Crashlytics.framework folder to your desktop, and then add it to your project again via File โ†’ Add Files to ....

If step 3 does not work for you, you can also add crashlytics.framework to your project folder directly on your computer, and then add it to your project list via Xcode in the same way as in step 3, but uncheck the box "Copy items if necessary "because you already posted the files there yourself.

My project is then compiled and works fine again.

In terms of why the file was missing? Part of the upgrade process made me remove the old frameworks, and then run the scripts, etc. From the plugin. I think what happened later when I emptied my trash that some links were lost. I also had a problem when I put Crashlytics in my .gitignore file so that it disappears from all my projects that were completed, and that was not the case.

Hope this helps someone!

0
Jun 25 '15 at 4:47
source share

Use pod update it helped me personally

0
May 08 '19 at
source share



All Articles