iPhone Data Usage Tracking/Monitoring project in ios?

Is there any project which help me to track iPhone Data Usage Tracking/Monitoring and the total time spent by the users in my app.

It looks like App Analytics (iTunes Connect) might do what you want. Additionally there are plenty of third party solutions like Facebook, Universal Analytics (Google), Flurry… which of these reports the exact metrics you want is something you would have to check on each provider’s documentation. I’ve used Flurry and Google before and neither was very difficult to integrate.

but i want to store the data on my own server.

It looks like you have a task ahead of you then. What you’re really looking at is a server that can receive data from your app and an API that allows you to send metrics that you define to that server. I don’t know of any library that has been written to do this because it’s so convenient to use one of the free third party services.

If you have a need to do this because of confidentiality - what about logging strings using one of the existing libraries but encrypting the logs before they are sent?