| With the development of mobile internet,mobile smart device become the most pop-ular internet tool for most netizens.The mobile application,as the core carrier of the mo-bile internet,Its importance is self-evident.As a high-quality mobile application,good per-formance and higher stability can bring better experience for users,and thus stand out in many competing products and occupy a larger market.In order to guarantee the perfor-mance and stability of the application,on the one hand,the performance of the application needs to be monitored,so that the developer has a better understanding of the application problems and bottlenecks;on the other hand,common application crashes can be pre-vented,so that the application provide stable services in some emergencies.This thesis first elaborates the research status of application performance manage-ment(APM)solutions,performance monitoring and crash-preventing at home and abroad.Based on the actual needs and the characteristics of traditional solutions,I design and implement the performance-monitoring and crash-preventing system based on iOS.The system can monitor performance parameters of the target application at runtime,including CPU,memory,network,fps and battery informantion.It can also find abnormal performance in application,which include interface lags,memory leaks,long loading time in interfaces that affect the user experience.In terms of improving stability,protect against common crashes in iOS development through hooking system methods or inserting mid-dle-level agents.In addition,the system also records data through the anomaly information reporting module,and provides a friendly user view in the system to display these ab-normal information,so that developers can have a more intuitive and clear understanding of these abnormal information.The System described in this thesis combines the ideal of aspect oriented program-ing,which does not intrude into business code and is easy to integrate into existing ap-plications,can effectively monitor and analyze application performance in complex envi-ronments,and provides practically meaningful performence index reports,and provide direction to improve application performance.At the same time,it can reduce the proba-bility of application crashes and provide more reliable and stable services. |