简体   繁体   中英

Logging iOS Native device feature and API calls

I am writing a dynamic analyzer for iOS apps and I would like to programatically track/log (without changing the source code of the app) all the API calls that access iOS Native features: Using the Camera, Barcode Scanner, Geolocation, Contact, InAppBrowser, Accelerometer, Maps, Calls, ... during the execution of the app. I want this to be as general as possible and not specific to a particular app code. I am considering using Objective-C Categories and Extensions on each class.

Any other solutions?

You can try to use method swizzle to add tracking code when app call certain system functions. And use + (void)load to init the swizzling. This should be able to avoid any code change to existing codebase.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM