- 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)]
- 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)
- 1.scan documents/nopnoah_shan folder to search all files
- 2.if one file exist directly return else analyze all except last file
// start-HOOKFunctions-Service
AOPNBPCoreManagerCenter.getInstance().startService()
// start-upload-Service
AOPEventUploadCenter.getInstance().startService()
AOPEventUploadCenter.getInstance().progressAction = { strResult , handle in
}
// 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 {}
}
}