Search code examples
objective-cios8crashlyticstwitter-fabric

Missing DYSM Error on multiple Target in Fabric and Objective C


In my app there are two targets:

 Target 1 : MyApp - com.app.myapp
 Target 2 : MyAppQA  - com.app.myappQa

Email Id used for Fabric registration is same for both targets.

I have created two apps using Fabric mac app.

In MyApp Target Fabric is catching all the crash and working fine. But When I run using target MyAppQA then I am getting Missing DYSM file error.

enter image description here

I am not able to get why crash is not captured in my second target.

Here is the method which I tried:

  1. BitCode - Disabled (Although I am not using bitcode but even then I crosschecked)

  2. Debug Information Format - Set to DWARF with dSYM File (Both release and debug)

  3. Tried uploading manually DYSM file (I got the dysm file by Archiving the project and then Selection ShowPackageContents from right ClickMenu)

I have tried all the possible solution available on internet. And also I don't want to manually update the dysm as I don't have iTunesConnect Account right now.


Solution

  • Step to integrate Crashlytics:-

    1.Add below cocoa pod

    pod 'Fabric'
    pod 'Crashlytics'
    

    2.Add a Run Script into Build Phase(For this step you must have login into fabric than get API key)

    "${PODS_ROOT}/Fabric/run" 8252525b24e2d6fagsdg101ea7faf49edefa84ff3ec342b0dgsdrergadc2bd8agsdg50671jhga2ee8c017ddgsdg33fbbb
    

    3.Add Your API Key into info.plist file

     <key>Fabric</key>
        <dict>
         <key>APIKey</key>
         <string>your_key</string>
         <key>Kits</key>
            <array>
             <dict>
                <key>KitInfo</key>
             <dict/>
            <key>KitName</key>
                <string>Crashlytics</string>
            </dict>
            </array>
        </dict>
    

    4.Add below code in AppDelegate file

    AppDelegate.h:-

    #import <Fabric/Fabric.h>
    #import <Crashlytics/Crashlytics.h>
    

    AppDelegate.m:-

    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
        [Fabric with:@[[Crashlytics class]]]
    }
    

    5.For force crash write below code on any button click event of view controller,can not write into app delegate file

    [[Crashlytics sharedInstance] crash];
    

    6.Change build setting:

     click on project target >>   Build setting >>  Chnage value of “Debug information Format” set it to “DWARF with dSYM file”
     click on project >>   Build setting >>  Chnage value of “Debug information Format” set it to “DWARF with dSYM file”
    

    7.How to crash app

     Xcode's debugger prevents us from processing crash reports. 
    
      To make sure a crash is reported during your simulator testing:
       ⁃    Launch simulator (Run your project and install app in simulator)
       ⁃    Press stop (stop from Xcode )
       ⁃    Launch your app and force a crash (Now do not run project, just open simulator and launch your app from simulator and press button that u write code for crash ` [[Crashlytics sharedInstance] crash];`)
       ⁃    Relaunch the app from simulator (again run app from simulator not from Xcode project)
       ⁃    See the crash report in the web dashboard