Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/growingio/growingio-sdk-ios-performance-ext
https://github.com/growingio/growingio-sdk-ios-performance-ext
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/growingio/growingio-sdk-ios-performance-ext
- Owner: growingio
- License: apache-2.0
- Created: 2022-10-14T03:46:31.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2024-01-31T06:19:11.000Z (11 months ago)
- Last Synced: 2024-11-06T04:46:47.230Z (about 2 months ago)
- Language: Objective-C
- Size: 17.1 MB
- Stars: 0
- Watchers: 6
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
GrowingIO APM
======
![GrowingIO](https://www.growingio.com/vassets/images/home_v3/gio-logo-primary.svg)### SDK 简介
**GrowingAPM** 提供移动端性能采集分析功能,包括崩溃分析、启动分析、页面加载分析等。
### 如何集成
- 集成默认监控模块
```ruby
pod 'GrowingAPM'
```- 或者,按需集成对应模块
```ruby
# 按照所需模块自由组合
pod 'GrowingAPM/UIMonitor'
pod 'GrowingAPM/CrashMonitor'
# ...
```### 初始化SDK
- 在 main.m 以及 AppDelegate.m 导入 GrowingAPM:
```objc
#import "GrowingAPM.h"
```- 在 main 函数中,添加如下代码 (此操作仅为了尽可能地在 App 运行前开启监测,除必要的崩溃日志本地缓存外,不会生成、上报数据):
```objc
int main(int argc, char * argv[]) {
// GrowingAPM Swizzle
[GrowingAPM setupMonitors];
NSString * appDelegateClassName;
@autoreleasepool {
// Setup code that might create autoreleased objects goes here.
appDelegateClassName = NSStringFromClass([AppDelegate class]);
}
return UIApplicationMain(argc, argv, nil, appDelegateClassName);
}
```- 在 AppDelegate.m application:didFinishLaunchingWithOptions: 中初始化 GrowingAPM:
```objc
// 添加 GrowingAPM 初始化配置
GrowingAPMConfig *config = GrowingAPMConfig.config;
// 根据您需要的监控类型
config.monitors = GrowingAPMMonitorsCrash | GrowingAPMMonitorsUserInterface;
// 初始化 GrowingAPM
[GrowingAPM startWithConfig:config];
```