ln_hehe
(luning)
2015 年10 月 16 日 04:07
1
现在有个需求需要监听别的App运行的时间,之前用了sysctl方法可以获取所有进程信息,现在被屏蔽了,实现想不出用什么办法了!!泡了几天论坛,发现用私有FBProcessManager这个类能获取,但是初始化的时候就报这个错 Terminating app due to uncaught exception ‘NSInternalInconsistencyException’, reason: ‘FBApplicationLibrary cannot be initialized before calling FBSystemAppMain()’
跪求各位 大神能通过什么方法获取!!
1 个赞
解决了没有? QQ:605157402 一起探讨下
我暂时用 IOKIT 能检测到进程是否运行 自己开定时器去扫描计时了 我没有找到其他好方法
ln_hehe
(luning)
2015 年10 月 20 日 06:04
8
跑了起来 好像没看到进程信息呢 请问你是如何检测到进程的?
ROOT > NxxAP >IOResources > IOCoreSurfaceROOT > IOSurfaceRootUserClient 每个节点下有运行的进程名字
1 个赞
ln_hehe
(luning)
2015 年10 月 21 日 03:08
10
终于找到了。。问你个问题 应用跳转出了设置URL Schemes打开应用的方法还能有什么方法做到跳转呢?
为什么有些app的进程能扫出来 有些不行呢 有遇到这个问题吗?
既然是IOKit ,我推断目标app必须要有IO动作才会被这个IOKit扫出来。拿一个空壳APP做测试,发现:
1。进行写文件操作。 结果 : 扫不出。
2。进行读文件操作。 结果 : 扫不出。
3。加载一个webview。 结果 : 扫出。
4。加载一个UIImageView并赋上图。 结果 : 扫出。
是不是只能检测到安装的程序,如果是用真机测试的时候直接跑的程序,貌似检测不到
Ld /Users/dandan/Library/Developer/Xcode/DerivedData/TestApp-bbhxnhaquqalsidiobfrmkywvapp/Build/Products/Debug-iphoneos/TestApp.app/TestApp normal armv7
cd /Users/dandan/Desktop/TestApp
export IPHONEOS_DEPLOYMENT_TARGET=9.1
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.1.sdk -L/Users/dandan/Library/Developer/Xcode/DerivedData/TestApp-bbhxnhaquqalsidiobfrmkywvapp/Build/Products/Debug-iphoneos -F/Users/dandan/Library/Developer/Xcode/DerivedData/TestApp-bbhxnhaquqalsidiobfrmkywvapp/Build/Products/Debug-iphoneos -filelist /Users/dandan/Library/Developer/Xcode/DerivedData/TestApp-bbhxnhaquqalsidiobfrmkywvapp/Build/Intermediates/TestApp.build/Debug-iphoneos/TestApp.build/Objects-normal/armv7/TestApp.LinkFileList -Xlinker -rpath -Xlinker @executable_path /Frameworks -miphoneos-version-min=9.1 -dead_strip -fembed-bitcode-marker -fobjc-arc -fobjc-link-runtime -Xlinker -dependency_info -Xlinker /Users/dandan/Library/Developer/Xcode/DerivedData/TestApp-bbhxnhaquqalsidiobfrmkywvapp/Build/Intermediates/TestApp.build/Debug-iphoneos/TestApp.build/Objects-normal/armv7/TestApp_dependency_info.dat -o /Users/dandan/Library/Developer/Xcode/DerivedData/TestApp-bbhxnhaquqalsidiobfrmkywvapp/Build/Products/Debug-iphoneos/TestApp.app/TestApp
Undefined symbols for architecture armv7:
“_IORegistryEntryGetNameInPlane”, referenced from:
-[ELLIOKitDumper _showService:parent:options:] in ELLIOKitDumper.o
导IOKit的时候编译会出这样错误,是为什么呢?有没有朋友遇到过?
Boom
(Boom)
2016 年2 月 16 日 02:15
16
你好,请问找到获取iOS9进程运行时间的方法了么?