Monitoring info about running processes of an iPhone with Objective C - iphone

I'm developing an iPhone app with XCode. I want to track the running applications of the phone and the memory, CPU usage for each of them. Still I wasn't able to find a way to do this. Can anyone help me?

Attach your iPhone to the Mac and "Profile" the app, selecting the Activity Monitor instrument. You should get the info you need from that.
EDIT: Changed 'PC' to 'Mac' (force of habit).

Related

How lost phone finding Apps ring the iphone even in Silent mode and App Killed stated

There are many 'Apple Device Finder' Apps in the store. Many of them help the user to ring the iphone even when the phone is in silent mode. I am trying to find out how this is achieved. How can we play sound on the iPhone which is the silent mode. Anyone knows the Apple-supported Framework or library to achieve this. I have not found any threads on how can an app makes phone ring on silent mode and even in the app killed state. Please help me.
I actually doubt that's possible. I think just iCloud "Find my iPhone" feature is able to do that.
For example, TuneIn alarm feature requires app to be open. If you kill the app, effectively it can't do anything. The only thing it would be able to do is to receive a push notification; but that's not handled by the app itself, but the OS.

How can i get background running applications detail in my Application for iOS?

I want to develop one application which should be monitoring how much application is running on how much time on my I-Phone Device(including internet browsers).
Please share your idea regarding this post.
little similar like this:
https://itunes.apple.com/us/app/system-manager/id455736462?mt=8
thanks
You really can't since Apple has placed very restrictive guidelines on Apps for iOS.
Although with some low level call you might get some running process information.
Because of the sandbox environment you might not be abele to much more information then that.
Also app's in background are suspended if they have no background running flaggs (voip, audio, location or accessory). Also if the system gets low on memory app that are suspended get killed and there memory freed up.
What you can do:
Try the List of All Processes OS X code which
Can we retrieve the applications currently running in iPhone and iPad
But keep in mind the restiction placed on you app by Apple: The iOS Environment, thus that there are app availble in the appstore that do what you want does not mean that you app will be allowed.

Profiling a running iOS app without a computer attached

I would like to profile a running app without a computer attached. Pretty much what the sample command does on Mac OS X. Is it possible ?
I would like to do this without any computer attached because my app gets into an endless loop only at certain GPS locations. I tried reproducing the problem by faking GPS fixes but I couldn't. Yet the issue is 100% reproductible in the field…
You can try logging suspected method and loop entry/exits to a file, and recover the file later using iTunes Document sharing or Xcode.
No - I'm pretty sure it isn't, as Apple does not allow developers to use any iOS-development tools on the platform itself. You might be able to build analytical stuff into your own app (RAM monitor etc.), but not by using another app.
Anyway, your computer is much better suited to the task than a device - so sick with it.
Maybe some day Apple will let us test/write iPhone apps from iPads...

iPhone System Processes by CPU Rate (top/ps)

What is the best way to programmatically access the processes sorted by cpu rate on the iPhone (similar to that seen in the *nix top command)? sysctl()?
You can use Instruments to do this, open up Instruments (/Developer/Applications/Instruments) and choose iPhone -> Activity Monitor and hit record, it'll give you all the applications running and how much CPU, RAM and everything else they are running.
Obviously this isn't programatically but you only need to worry about the CPU of a single app at a time if your developing and using this you can profile the app in question very easily
I don't believe you can. Applications are sandboxed on the iPHone platform. A rule of thumb on that platform is to just worry about your own application because you can't access much outside of it.

Can I run multiple app in iphone simultaneously

I want to run two app simultaneously, I am using jailbroken phone and dont want to upload that app to the app store.
Is there any way so that I can log phone call time, this can only be done if my "logging app" is running in background.
Please suggest me, how can I do this on jailbroken phone.
Some thing like:http://msdn.microsoft.com/en-us/library/ms884959.aspx (its for windows)
Is this actually a programming question, or are you asking for an app that logs call times?
Assuming the former, you would write a iPhone program that hooks into current phone conversations some way (private APIs? Not sure if this is indeed possible, just assuming.) You would then run your app via Backgrounder or some other wrapper that provided an interface for multiple applications to run at the same time. This usually comes at the cost of increase battery life, depending on how much CPU (and maybe memory?) the backgrounded app consumes.
Backgrounder is available via Cydia, I believe.
Need to include CoreTelephony, will solve the issue