-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.md
68 lines (49 loc) · 2.57 KB
/
README.md
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# ABSTRACT-NBPUser- behavior trace
### 1.nbp user behavior trace[use objc Aspects kit]
### 2.sqlite3.2 from master rebuild ###
### 3.mergeSort - swift
### 4.custom queue [use closure do it]
### 5.logic layer [ibll follow JAVA-SPRING]
### 1.0 nbp user behavior trace DISK-progress center
* 1.use mmap save the memory event infos.
* 2.read event info from file : if success then deleate the file ,
if deleate file success return the fileStrinfo else return nil.
user should not invoking the deleate function manual.
* 3.basic file/dir progress [file create | file deleate | file read | file write(use mmap)]
### 2.1 optimize the mmap
* 1.add cache & no cache function change
* 2.use mmap save info
* 3.import sqliteFMDB but no use ( if mmap couldn't do well, change to sqlite very easy)
### 2.2 optimize the upload center
* 1.scan documents/nopnoah_shan folder to search all files
* 2.if one file exist directly return else analyze all except last file
# --HOW TO USE :
// start-HOOKFunctions-Service
AOPNBPCoreManagerCenter.getInstance().startService()
// start-upload-Service
AOPEventUploadCenter.getInstance().startService()
AOPEventUploadCenter.getInstance().progressAction = { strResult , handle in
}
# --CHANGE HOOK FUNCTIONS:
// extends the superclass : GodfatherSwizzing plz.
class ApplicitonSwizzing: GodfatherSwizzing {
// application-sendAction
let appSendActionBlock:@convention(block) (_ id: AspectInfo)-> Void = { aspectInfo in
let event = AOPEventFilter.appFilter(aspectInfo: aspectInfo)
GodfatherSwizzingPostnotification.postNotification(notiName: Notification.Name.InspurNotifications().appSendActions,
userInfo: [AOPEventType.applicationSendaction:event])
}
// navigation-pop(custom btn replace the sys navigationBar-backBtn)
let navigationPopBlock:@convention(block) (_ id: AspectInfo)-> Void = { aspectInfo in
}
// application sendaction
override func aopFunction() {
do{
try UIControl.aspect_hook(#selector(UIControl.sendAction(_:to:for:)),
with: .init(rawValue: 0),
usingBlock: appSendActionBlock)
try UINavigationController.aspect_hook(#selector(UINavigationController.popViewController(animated:)), with:
.init(rawValue: 0), usingBlock: appSendActionBlock)
}catch {}
}
}