ios -> Apple audit crash log analysis

From:   http://www.cnblogs.com/siasyl/p/7339013.html

 

Reference article: http://www.qingpingshan.com/rjbc/ios/230949.html

 

1. Create a new folder on the desktop and name it yourself (crash);

2. Find the location of Xcode, right-click "Show Package Contents", and find the symbolicatecrash tool according to the following directory:

/Applications/Xcode.app/Contents/SharedFrameworks/DVTFoundation.framework/Versions/A/Resources/symbolicatecrash

 

/Applications/Xcode.app/Contents/SharedFrameworks/DVTFoundation.framework/Versions/A/Resources/symbolicatecrash, and copy it out and put it in the (crash) folder just created;



 

3. Download the crash log returned by Apple's audit and put it in the crash folder you just created;

4. Open Xcode, select Window-->Orgianzer to find the corresponding Archive file,



 

Click Download dSYMS on the right,



 

If prompted No dSYMs were found for Version xxx Build xxx ,



 

You can right-click the corresponding Archive file, show in finder, then right-click to display the package content, find the corresponding dYSMs file in the dSYMs folder, and copy it to the folder just now;



 

If the folder is empty, then check the Xcode settings, search for "debug information format" in Xcode --> Build Setting, change "DWARF" to "DWARF with dSYM File", and then repackage it to find it;



  

5. Open the terminal and enter the folder just now (cd your own folder path you just created)

1
cd /Users/xxx/desktop/crash 

6. Then enter the following command

1
./symbolicatecrash ./crash.txt ./MyAppName.app.dSYM > crash. log
./symbolicatecrash ./1.txt ./MyAppName.app.dSYM > 1.crash

 

 

Note: 1.txt is the name of the crash log returned by Apple, MyAppName.app.dSYM is the name of the dSYM file you copied yourself, and the name 1.crash of the log file you want to output

In the crash folder before executing the command (the above three txt format are the crash log files returned by Apple)



 

After executing the command (.crash file is the generated log file)



 

7. If the prompt "DEVELOPER_DIR" is not defined at xxxxxxxxxxxxxx, then enter the following command, if not, skip

1
export DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer

8. Then re-enter the command from step 6

1
./symbolicatecrash ./crash.txt ./MyAppName.app.dSYM > crash. log

9. Open the log file for analysis



 

 

10. Find the onReGeocodeSearchDone method in SportMainController according to the prompt



 

 

11. It is found that there is a problem when intercepting the string in else, it is possible that the length of the string is 0, so substringToIndex:-1 will cause the program to crash, add a judgment condition, the problem is solved



 

 

 

 

 

 

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326216989&siteId=291194637