In my application I want to get the total number of SMS sent from iPhone. My application is targeted for cydia store for jail broken devices and Currently I am working on xcode 4.5.2 and iOS 6.
When the application opens I want to get the total SMS sent from iPhone message log. Can we get total SMS sent on a particular day. I saw some applications in cydia store which maintains SMS history logs for example"SMS Stats", "SMS Counter". Is there any third party framework to get sms count?. I had searched in many ways but I found no solution. Please help me.
The messages are kept in a SQLite database called sms.db
You can make queries on it to collect the information you want.
At theiphonewiki got some information about the DB but I am not sure it is updated to iOS 6, you might just have to investigate the DB using some SQLite explorer to figure out what you need.
Related
I have a crazy idea. I have read that accessing SMS messages from code for iPhone is impossible.
But is there a way to bypass this? I would like to write a piece of software which accesses user's SMS messages and shows some analytics.
I have read that it is possible for iPhone user to make SMS backups.
And here my question comes: can a user somehow set automatic SMS backup to somewhere (e.g. iCloud or Desktop), so that I can write software which will automatically read that backup and show some analytics?
Let's assume that the iPhone user doesn't mind to give my software access to his SMS messages backup.
Apple uses a technique called sandboxing. An app can only access it's own files. Your app can only access it's files in it's own application directory. The SMS database is not in your apps directory. The SMS messages cannot be accessed on a non-jailbroken phone. (Apple is getting better at protecting against jailbreaks).
Is it possible to write an Iphone App that can access the SMS Messages on the Phone and store it elsewhere? I have seen other questions like this and another question that says one can send SMS with the MFMessageComposeViewController from the MessageUI Framework.
Since both the questions were more than a year old, is it possible to do this now ( Accessing SMS messages and storing it on the iCloud) ?
No this is not possible, the iOS SDK does not allow you to access the messages from the messages.app.
Also all message are already backed up to iCloud when a device backup is made.
The Apple Dev Library says, "In iOS 4.0 and later, you can send text messages from within your application. This feature is strictly for sending messages. Incoming SMS messages go to the built-in Messages app." I wish they would explain why they won't allow programs to access messages.
So not with an iPhone app, apparently, but you can access them with a desktop app. See http://www.wired.com/2013/11/backup-sms-iphone:
"Apple saves your text messages in its iPhone backups, whether they’re saved locally on your PC or whether they’re part of an iCloud backup — which you should have. That’s good! Unfortunately, they’re not separated out. However, you can access them through the filesystem. If you back up locally on an Apple machine, you can find the file under Library > Application Support > MobileSync > Backup. There should be multiple folders there, each with a different backup image of your phone. Each of the folders should have a file named ” 3d0d7e5fb2ce288813306e4d4636395e047a3d28.mddata.” Those are your texts, in SQLite database form."
You'll need to use SQLite to decipher the file. There are some instructions here:
How to Access and Read the iPhone SMS Text Message Backup Files.
I'm trying to implement an app that can read received SMS and email out. I mean convert the text content to voice. So I need to access to SMS and email first. As far as I know, there is no such API provided in the default SDK. Is there any other way to realize it?
Are the SMS messages stored in database(sms.db)? How to access to them? Is it only possible on jailbroken iphones?
And what about emails? Are they only stored in mail servers? How can I get them in my app?
Sorry for asking so many questions. I have spent many days on this problem, but havn't found any solutions...
You can't. According to the Device Features Programming Guide: Sending an SMS Message:
In iPhone OS 4.0 and later, you can send text messages from within your application. This feature is strictly for sending messages. Incoming SMS messages go to the built-in Messages app.
There are serious privacy and security concerns with enabling app access to emails and SMS, and I am glad Apple choose not to do it.
Yes, you can, (at least with SMS) but only in a jailbreak app (which you suggest is ok in your comments).
The sms.db file can be read by apps that aren't sandboxed.
See my answer to a similar question for how to get SMS content. That answer just shows how to get the most recent SMS, but if you just use the commented out while loop, you can iterate through all SMS.
i want to create a application which sync my iPhone contacts to my server and vice-versa.
i read a article on google Get Google Sync on your phone . i want to this type of feature which directly update the contact without user interaction (however one time setting is desired).
any body have idea how the google sync work .
Please advice me that how can i achieve this task. any suggestion and link is greatly appreciated
I think it's important to separate the two overlapping approaches in your question.
Firstly, Google Sync is essentially a way to use Microsoft Exchange protocols and to setup a Mail / Contact / Calendar profile on an iPhone. The iPhone OS supports this feature, not an iPhone App in the App Store. Google Sync leverages this fundamental capability of the phone by exposing the data (mail, contacts, calendars) via these known protocols. If you want to expose data in this way to your users, setup a Microsoft Exchange server and ask questions on serverfault.
Secondly, there are iPhone apps. iPhone apps sold in the app store are not currently allowed to run in the background. This means you can't emulate functionality like iTunes or Mail where your music plays while you are browsing the web, or mail checking is done while you are playing a game of Mini Squadron. If you want this backgrounding capability, file a bug/enhancement with Apple.. However, you can interact with iPhone contacts (Address Book) via the API.. You can also of course "re-invent the wheel" and expose the data however you like via the internet, and consume that data from a custom iPhone App with the one caveat that users would need to actively launch your application to get to this data and it would not be integrated with the built-in iPhone Calendar, Address Book or Mail applications. Some good examples of that are some of the music community apps that have messaging systems built into them. Presumably that is all being done with web services.
EDIT: It is also worth mentioning that should you go the "iPhone App" route, you should at least consider if push notifications are right for you, and if so how you will handle it.
Have you seen the API-Docs?
http://developer.apple.com/iphone/library/documentation/ContactData/Conceptual/AddressBookProgrammingGuideforiPhone/100-Introduction/Introduction.html
Next there is an application I use called Funambol - it is a sync4j Server/Client. They have an open source application to sync contacts on the iPhone. Source is somewhere in their repository, informations here: http://forge.ow2.org/scm/?group_id=96
As slf told you your application must run in foreground. This may limit you.
Good luck & best regards,
Florian
The 3.0 SDK will allow your application to read contact data on the phone.
Web services will allow you to publish that data to your server, and receive updates.
You may also want to use coredata to store a hash of all contact data so you can tell what is new / updated and just send that data to your server.
If you deploy an application through the iTunes app store, what usage information do you get from Apple? Do you only get the number of downloads/sales, and does this differ for free vs. paid apps? Do you get any information regarding how often it is used, crash logs, demographics info, etc? Is the only way to build hooks to your own server to track this information and would such an app even get approved?
I've seen articles such as this one that includes quotes like:
only about 20 percent of users return to use a free app the day after they first download it and by 30 days out, less than five percent are using the app.
Is that based on surveys, or is it data that comes from Apple? There doesn't appear to be much publicly available data except when Apple shows the top applications, but that is just based downloads or ratings, and nothing deeper.
Most of this information comes from companies like Pinch Media and Admob. They supply libraries you can include in you app which inform their servers of events in your app (specifically launch but also other events decided by you).
They use these events to provide aggregate information on iPhone apps. Several reports have been published recently referencing this data.
You only receive usage information if you somehow program the reporting of such information into your app.
Number of Downloads (Sales if a non-free app) and more recently crash logs are the only information you receive from Apple. you do not even receive personal information about WHO is was that bought your app, only that they did.
You won't get usage statistics from Apple, only download and sales statistics. The reporting is slightly different for free apps(as they won't show up in the financial report), but basically the same information is provided.
You can however track usage information on your own by having your application ping a remote server every time the app is accessed. You can use the unique device id to track a specific user. This will be dependent on internet access for the iPhone/iPod Touch.
Apple does give you how many downloads have occurred as well as what countries they are from. If you want more detailed usage statistics you will have to go to a third party solution, or write it yourself.
Unless Apple is secretly sending usage information when an app is opened, I don't see how anyone can get aggregate statistics about the whole app store. When I upload an app, it is in binary format, and it is probably unlikely that anyone adds in their own code to secretly do this.