Missing DYSM Error on multiple Target in Fabric and Objective C

前端 未结 2 840
执念已碎
执念已碎 2021-01-23 05:16

In my app there are two targets:

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

Email Id used for Fabric

2条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-23 05:59

    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

     Fabric
        
         APIKey
         your_key
         Kits
            
             
                KitInfo
             
            KitName
                Crashlytics
            
            
        
    

    4.Add below code in AppDelegate file

    AppDelegate.h:-

    #import 
    #import 
    

    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
    

提交回复
热议问题