ソースを参照

新增发送自定义日志的插件

liufl5 6 年 前
コミット
91c6b2da9e

+ 8 - 0
IpuCommon/Frameworks/IpuCount.framework/Headers/IpuCommonUtil.h

@ -87,6 +87,10 @@
87 87
 */
88 88
+ (NSString *)getWifiSSID;
89 89
/*
90
 获取CPU类型
91
 */
92
+(NSString *)getCPUType;
93
/*
90 94
 获取当前手机CPU使用率,已*100
91 95
 */
92 96
+(float)cpu_usag;
@ -98,6 +102,10 @@
98 102
 获取当前已使用手机内存
99 103
 */
100 104
+ (double)usedMemory;
105
/*
106
 通过堆栈信息获取异常位置
107
 */
108
+(NSString*)locationExcptionThroughCallStackSymbols:(NSArray*)callStackSymbols;
101 109
102 110
#pragma mark - 路径相关
103 111
/*

+ 1 - 0
IpuCommon/Frameworks/IpuCount.framework/Headers/IpuCount.h

@ -25,6 +25,7 @@
25 25
#import <IpuCount/IpuPluginMonitor.h>
26 26
27 27
#import <IpuCount/IpuCountLocation.h>
28
#import <IpuCount/IpuCrashExceptionHandler.h>
28 29
29 30
30 31
#endif /* IpuCount_h */

+ 17 - 0
IpuCommon/Frameworks/IpuCount.framework/Headers/IpuCrashExceptionHandler.h

@ -0,0 +1,17 @@
1
//
2
//  IpuCrashExceptionHandler.h
3
//  IpuCount
4
//
5
//  Created by Mac on 2019/7/11.
6
//  Copyright © 2019年 shelomi. All rights reserved.
7
//
8
9
#import <Foundation/Foundation.h>
10
#import <UIKit/UIKit.h>
11
12
@interface IpuCrashExceptionHandler : NSObject
13
14
+ (void)setDefaultHandler;
15
+ (NSUncaughtExceptionHandler *)getHandler;
16
17
@end

BIN
IpuCommon/Frameworks/IpuCount.framework/IpuCount


BIN
IpuCommon/Frameworks/WadeMobileFunc.framework/WadeMobileFunc


+ 3 - 3
IpuLib/IpuLib.xcodeproj/xcuserdata/mac.xcuserdatad/xcschemes/xcschememanagement.plist

@ -7,17 +7,17 @@
7 7
		<key>IpuLib.xcscheme</key>
8 8
		<dict>
9 9
			<key>orderHint</key>
10
			<integer>31</integer>
10
			<integer>6</integer>
11 11
		</dict>
12 12
		<key>IpuLib4Appstore.xcscheme</key>
13 13
		<dict>
14 14
			<key>orderHint</key>
15
			<integer>32</integer>
15
			<integer>14</integer>
16 16
		</dict>
17 17
		<key>IpuLib4Develop.xcscheme</key>
18 18
		<dict>
19 19
			<key>orderHint</key>
20
			<integer>33</integer>
20
			<integer>15</integer>
21 21
		</dict>
22 22
	</dict>
23 23
</dict>

+ 1 - 0
SuperMenu/Res/config/mobile-action.xml

@ -190,5 +190,6 @@
190 190
    
191 191
    <!--控制行为分析框架日志开关-->
192 192
    <action name="closeCountLog"  class="IPUCountLogPlugin"   method="closeCountLog"/>
193
    <action name="sendDefine"  class="IPUCountLogPlugin"   method="sendCustomLog"/>
193 194
    
194 195
</actions>

BIN
SuperMenu/SuperMenu.xcodeproj/project.xcworkspace/xcuserdata/mac.xcuserdatad/UserInterfaceState.xcuserstate


+ 8 - 40
SuperMenu/SuperMenu.xcodeproj/xcuserdata/mac.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@ -554,7 +554,7 @@
554 554
                  moduleName = "IpuCount"
555 555
                  usesParentBreakpointCondition = "Yes"
556 556
                  urlString = "file:///Users/mac/work/asiainfo/ios-plugin/IpuCount/IpuCount/proxy/IpuProxyEngine.m"
557
                  timestampString = "584006825.644785"
557
                  timestampString = "584951401.782122"
558 558
                  startingColumnNumber = "9223372036854775807"
559 559
                  endingColumnNumber = "9223372036854775807"
560 560
                  startingLineNumber = "348"
@ -569,7 +569,7 @@
569 569
                  moduleName = "IpuCount"
570 570
                  usesParentBreakpointCondition = "Yes"
571 571
                  urlString = "file:///Users/mac/work/asiainfo/ios-plugin/IpuCount/IpuCount/proxy/IpuProxyEngine.m"
572
                  timestampString = "584006825.646669"
572
                  timestampString = "584951401.783874"
573 573
                  startingColumnNumber = "9223372036854775807"
574 574
                  endingColumnNumber = "9223372036854775807"
575 575
                  startingLineNumber = "340"
@ -633,22 +633,6 @@
633 633
            shouldBeEnabled = "Yes"
634 634
            ignoreCount = "0"
635 635
            continueAfterRunningActions = "No"
636
            filePath = "../../ios-plugin/IpuCount/IpuCount/util/IpuCountUDPHelper.m"
637
            timestampString = "579426515.926054"
638
            startingColumnNumber = "9223372036854775807"
639
            endingColumnNumber = "9223372036854775807"
640
            startingLineNumber = "126"
641
            endingLineNumber = "126"
642
            landmarkName = "-sendContents:"
643
            landmarkType = "7">
644
         </BreakpointContent>
645
      </BreakpointProxy>
646
      <BreakpointProxy
647
         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
648
         <BreakpointContent
649
            shouldBeEnabled = "Yes"
650
            ignoreCount = "0"
651
            continueAfterRunningActions = "No"
652 636
            filePath = "../WadeMobileFunc/WadeMobileFunc/WDFUploadDownload.m"
653 637
            timestampString = "572423400.44523"
654 638
            startingColumnNumber = "9223372036854775807"
@ -762,7 +746,7 @@
762 746
                  moduleName = "WadeMobileFunc"
763 747
                  usesParentBreakpointCondition = "Yes"
764 748
                  urlString = "file:///Users/mac/work/asiainfo/ios-share/WadeMobileFunc/WadeMobileFunc/WDFUploadDownload.m"
765
                  timestampString = "584006825.732689"
749
                  timestampString = "584951401.842242"
766 750
                  startingColumnNumber = "9223372036854775807"
767 751
                  endingColumnNumber = "9223372036854775807"
768 752
                  startingLineNumber = "472"
@ -777,7 +761,7 @@
777 761
                  moduleName = "WadeMobileFunc"
778 762
                  usesParentBreakpointCondition = "Yes"
779 763
                  urlString = "file:///Users/mac/work/asiainfo/ios-share/WadeMobileFunc/WadeMobileFunc/WDFUploadDownload.m"
780
                  timestampString = "584006825.734611"
764
                  timestampString = "584951401.844879"
781 765
                  startingColumnNumber = "9223372036854775807"
782 766
                  endingColumnNumber = "9223372036854775807"
783 767
                  startingLineNumber = "472"
@ -970,7 +954,7 @@
970 954
                  moduleName = "WadeMobile"
971 955
                  usesParentBreakpointCondition = "Yes"
972 956
                  urlString = "file:///Users/mac/work/asiainfo/ios/WadeMobile/WadeMobile/frame/template/WDTemplateMainController.m"
973
                  timestampString = "584006825.82877"
957
                  timestampString = "584951402.208165"
974 958
                  startingColumnNumber = "9223372036854775807"
975 959
                  endingColumnNumber = "9223372036854775807"
976 960
                  startingLineNumber = "202"
@ -985,7 +969,7 @@
985 969
                  moduleName = "WadeMobile"
986 970
                  usesParentBreakpointCondition = "Yes"
987 971
                  urlString = "file:///Users/mac/work/asiainfo/ios/WadeMobile/WadeMobile/frame/template/WDTemplateMainController.m"
988
                  timestampString = "584006825.83075"
972
                  timestampString = "584951402.2107019"
989 973
                  startingColumnNumber = "9223372036854775807"
990 974
                  endingColumnNumber = "9223372036854775807"
991 975
                  startingLineNumber = "203"
@ -1000,7 +984,7 @@
1000 984
                  moduleName = "WadeMobile"
1001 985
                  usesParentBreakpointCondition = "Yes"
1002 986
                  urlString = "file:///Users/mac/work/asiainfo/ios/WadeMobile/WadeMobile/frame/template/WDTemplateMainController.m"
1003
                  timestampString = "584006825.832908"
987
                  timestampString = "584951402.212617"
1004 988
                  startingColumnNumber = "9223372036854775807"
1005 989
                  endingColumnNumber = "9223372036854775807"
1006 990
                  startingLineNumber = "202"
@ -1065,7 +1049,7 @@
1065 1049
            ignoreCount = "0"
1066 1050
            continueAfterRunningActions = "No"
1067 1051
            filePath = "SuperMenu/ViewController.m"
1068
            timestampString = "580035664.0012079"
1052
            timestampString = "584951401.4510601"
1069 1053
            startingColumnNumber = "9223372036854775807"
1070 1054
            endingColumnNumber = "9223372036854775807"
1071 1055
            startingLineNumber = "177"
@ -1112,22 +1096,6 @@
1112 1096
            shouldBeEnabled = "Yes"
1113 1097
            ignoreCount = "0"
1114 1098
            continueAfterRunningActions = "No"
1115
            filePath = "SuperMenu/multiple/IPUCountLogPlugin.m"
1116
            timestampString = "576744251.719043"
1117
            startingColumnNumber = "9223372036854775807"
1118
            endingColumnNumber = "9223372036854775807"
1119
            startingLineNumber = "18"
1120
            endingLineNumber = "18"
1121
            landmarkName = "-closeCountLog:"
1122
            landmarkType = "7">
1123
         </BreakpointContent>
1124
      </BreakpointProxy>
1125
      <BreakpointProxy
1126
         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
1127
         <BreakpointContent
1128
            shouldBeEnabled = "Yes"
1129
            ignoreCount = "0"
1130
            continueAfterRunningActions = "No"
1131 1099
            filePath = "../../ios-plugin/IpuCount/IpuCount/monitor/IpuDataMonitor.m"
1132 1100
            timestampString = "579449014.976009"
1133 1101
            startingColumnNumber = "9223372036854775807"

+ 11 - 2
SuperMenu/SuperMenu/AppDelegate.m

@ -12,10 +12,11 @@
12 12
#import <IpuCount/IpuCountReport.h>
13 13
#import <IpuCount/IpuCountConstant.h>
14 14
#import <IpuCount/IpuCountConfig.h>
15
#import <IpuCount/IpuCrashExceptionHandler.h>
15 16
16 17
#import <WadeMobile/WDJsonHelper.h>
17 18
18
#import "IPUSuspendConfig.h"
19
//#import "IPUSuspendConfig.h"
19 20
20 21
@interface AppDelegate ()
21 22
{
@ -35,7 +36,7 @@
35 36
//    }else{
36 37
//        [[IpuCountConfig sharedManager] openCountLog];
37 38
//    }
38
//    //发送启动日志
39
    //发送启动日志
39 40
//    [IpuCountReport reportAppStartWithRemark1:nil Remark2:nil];
40 41
    
41 42
    /*资源在远程的场景*/
@ -47,6 +48,14 @@
47 48
    
48 49
    return rootCtrl;
49 50
}
51
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(nullable NSDictionary<UIApplicationLaunchOptionsKey, id> *)launchOptions {
52
    
53
    //异常捕获处理
54
    [IpuCrashExceptionHandler setDefaultHandler];
55
    
56
    [super application:application didFinishLaunchingWithOptions:launchOptions];
57
    return YES;
58
}
50 59
51 60
- (void)applicationWillResignActive:(UIApplication *)application {
52 61
    [super applicationWillResignActive:application];

+ 2 - 2
SuperMenu/SuperMenu/ViewController.m

@ -37,8 +37,8 @@
37 37
//    //添加悬浮按钮
38 38
//    [self setupSuspendButton];
39 39
40
//    //添加动态插码
41
//    [IpuProxy setupProxys];
40
    //添加动态插码
41
    [IpuProxy setupProxys];
42 42
}
43 43
#pragma mark - 和助手手势密码
44 44
/*

+ 5 - 0
SuperMenu/SuperMenu/multiple/IPUCountLogPlugin.h

@ -13,4 +13,9 @@
13 13
//控制行为分析框架日志开关,供外部接口(JS)调用
14 14
-(void)closeCountLog:(NSArray *)params;
15 15
16
/*
17
 发送自定义日志
18
 */
19
- (void)sendCustomLog:(NSArray *)params;
20
16 21
@end

+ 16 - 1
SuperMenu/SuperMenu/multiple/IPUCountLogPlugin.m

@ -7,7 +7,7 @@
7 7
//
8 8
9 9
#import "IPUCountLogPlugin.h"
10
#import <IpuCount/IpuCountConfig.h>
10
#import <IpuCount/IpuCount.h>
11 11
12 12
@implementation IPUCountLogPlugin
13 13
@ -35,4 +35,19 @@
35 35
    }
36 36
}
37 37
38
/*
39
 发送自定义日志
40
 */
41
- (void)sendCustomLog:(NSArray *)params {
42
    NSString *content;
43
    if (params[0]==[NSNull null]) {
44
        content = nil;
45
    }else{
46
        content = params[0];
47
    }
48
    if (content) {
49
        [[IpuCountUDPHelper sharedInstance] sendReport:content];
50
    }
51
}
52
38 53
@end

+ 5 - 5
WadeMobileFunc/WadeMobileFunc.xcodeproj/xcuserdata/mac.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@ -26,12 +26,12 @@
26 26
                  moduleName = "WadeMobileFunc"
27 27
                  usesParentBreakpointCondition = "Yes"
28 28
                  urlString = "file:///Users/mac/work/asiainfo/ios-share/WadeMobileFunc/WadeMobileFunc/WDFSocial.m"
29
                  timestampString = "584438136.591792"
29
                  timestampString = "584951401.803017"
30 30
                  startingColumnNumber = "9223372036854775807"
31 31
                  endingColumnNumber = "9223372036854775807"
32 32
                  startingLineNumber = "291"
33 33
                  endingLineNumber = "291"
34
                  offsetFromSymbolStart = "1132">
34
                  offsetFromSymbolStart = "1142">
35 35
               </Location>
36 36
               <Location
37 37
                  shouldBeEnabled = "Yes"
@ -41,12 +41,12 @@
41 41
                  moduleName = "WadeMobileFunc"
42 42
                  usesParentBreakpointCondition = "Yes"
43 43
                  urlString = "file:///Users/mac/work/asiainfo/ios-share/WadeMobileFunc/WadeMobileFunc/WDFSocial.m"
44
                  timestampString = "584438136.5961829"
44
                  timestampString = "584951401.804974"
45 45
                  startingColumnNumber = "9223372036854775807"
46 46
                  endingColumnNumber = "9223372036854775807"
47 47
                  startingLineNumber = "292"
48 48
                  endingLineNumber = "292"
49
                  offsetFromSymbolStart = "52">
49
                  offsetFromSymbolStart = "39">
50 50
               </Location>
51 51
               <Location
52 52
                  shouldBeEnabled = "Yes"
@ -56,7 +56,7 @@
56 56
                  moduleName = "WadeMobileFunc"
57 57
                  usesParentBreakpointCondition = "Yes"
58 58
                  urlString = "file:///Users/mac/work/asiainfo/ios-share/WadeMobileFunc/WadeMobileFunc/WDFSocial.m"
59
                  timestampString = "584438136.599372"
59
                  timestampString = "584951401.806888"
60 60
                  startingColumnNumber = "9223372036854775807"
61 61
                  endingColumnNumber = "9223372036854775807"
62 62
                  startingLineNumber = "291"

+ 3 - 3
WadeMobileFunc/WadeMobileFunc.xcodeproj/xcuserdata/mac.xcuserdatad/xcschemes/xcschememanagement.plist

@ -7,17 +7,17 @@
7 7
		<key>WadeMobileFunc.xcscheme</key>
8 8
		<dict>
9 9
			<key>orderHint</key>
10
			<integer>0</integer>
10
			<integer>16</integer>
11 11
		</dict>
12 12
		<key>WadeMobileFunc4Appstore.xcscheme</key>
13 13
		<dict>
14 14
			<key>orderHint</key>
15
			<integer>3</integer>
15
			<integer>18</integer>
16 16
		</dict>
17 17
		<key>WadeMobileFuncAggregate.xcscheme</key>
18 18
		<dict>
19 19
			<key>orderHint</key>
20
			<integer>2</integer>
20
			<integer>19</integer>
21 21
		</dict>
22 22
	</dict>
23 23
</dict>