问题
Crashlytics has been installed in the app in question for a couple of releases now. It's been working great.
But as we prepare the next release Crashlytics has stopped reporting crashes in Release mode. Here are the things I can think of that have changed since our last release.
- Xcode 7.1. The last release was prepared with Xcode 6.
- We upgraded to Fabric.
- We're testing the app on iOS 9.1.
Anyway, with all those changes crashes are still being reported just fine in Debug. Just not in Release (installing from TestFlight after archiving and uploading to iTunes Connect).
Here are the things I've checked:
On the Fabric site the app is there, the version and build are there. When I click on Missing DSYMs it tells me there are none missing.
startWithAPIKey
is being called indidFinishLaunchingWithOptions
(added after trojanfoe's question).The api key is correct. Checked and double-checked.
In the build script there isn't (and never was) a distinction between Debug and Release. It looks like this:
- In Build Settings
DEBUG_INFORMATION_FORMAT
is already set toDWARF with dSYM File
(added after StormXX's question):
What am I missing?
回答1:
Mike from Crashlytics and Fabric here.
With Fabric, the initialization of Crashlytics did change slightly. Using the following code should work (Obj-C):
#import "AppDelegate.h"
#import <Fabric/Fabric.h>
#import <Crashlytics/Crashlytics.h>
@interface AppDelegate ()
@end
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Override point for customization after application launch.
[Crashlytics startWithAPIKey:@"YourAPIKey"];
// You can comment out the above line if you have your Twitter Fabric API key in your info.plist.
[Fabric with:@[[Crashlytics class]]];
return YES;
}
Updating the run script build phase to the following is also recommended:
./Fabric.framework/run <YourAPIKey> <YourBuildSecret>
回答2:
I was also facing this issue. My apps DSYMs files were not being automatically uploaded to Fabric as had previously been the case. The root cause was found to be that xcode 7.1 had defaulted the project to bitcode enabled = YES
Setting Bitcode enabled = NO in my Build Settings fixed the auto upload issue.
From Fabrics advanced set up document:
Bitcode enabled applications are required to download their dSYM from Xcode and then upload it to Crashlytics so that we can symbolicate the crashes.
回答3:
I met the same problem and I sovle it... Check your project's Build Setting , find Debug Information Format. change it to DWARF with dSYM File
Image
回答4:
For me didn't help uploading dsym files from .xcarchive. Only when i've downloaded zip dSYM archive from the iTunesConnect and uploaded it to fabric - it make sense.
回答5:
In my case, it was totally a different issue. Earlier I was getting all the crash reports perfectly but then due to some reasons, I have to update my bundle id of the project.
So If you update your bundle id then the project you have created on Fabric will not receive crash reports since you need to create one new project for that new bundle id.
Important: If bundle id is different on your fabric app then you will never receive any crash reports.
Tip: Create your projects in Fabric using the Fabric desktop application.
来源:https://stackoverflow.com/questions/33404777/crashlytics-not-reporting-crash-in-release-mode