Missing DYSM Error on multiple Target in Fabric and Objective C

白昼怎懂夜的黑 提交于 2019-12-02 01:21:49

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

Mike from Fabric here.

Once the dSYM is uploaded, we will start reprocessing any crashes from the last 7 days, so it should be visible by now.

For uploading dSYMs, including seeing any errors with the upload flow, you can use the upload-symbols script located in the Fabric OS X app at Fabric.app/Contents/MacOS/upload-symbols and in the Fabric CocoaPod payload at $PODS_ROOT/Fabric/upload-symbols

Run the script with the following to upload all dSYMs from a given folder:

find <directory-to-search-for-dsyms> -name "*.dSYM" | xargs -I \{\} /path/to/upload-symbols -a <api-key> -p <platform> \{\}

Documentation reference.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!