An Iphone App to access SMS and store it on iCloud - iphone

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.

Related

To Create Software to Access SMS Backup on iPhone

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).

to get sms stats in application

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.

Want to transfer data on iPhone to a program on a PC

I have an iPhone app that reads barcodes. I want to transfer that data to a program I have written on my PC. Is this possible?
The easiest way to do this is to have a web server which the app transfers the barcode to and the application on the computer grabs it from. You could probably have each user make an account which they log in to on both the phone and the computer.
EDIT: This document: http://developer.apple.com/library/ios/#technotes/tn2152/_index.html describes various methods for transferring data between an iphone and a computer.
This is just a suggestion, haven't tried it myself: You can use the iTunes filesharing feature Apple introduced for iOS. This seems to be a good tutorial on how to use it in your App http://www.raywenderlich.com/1948/how-integrate-itunes-file-sharing-with-your-ios-app
The only thing is that it requires the user to import/export the files to share on their own via iTunes, if you're cool with that it sounds like a good strategy to use built-in features of iOS.

What folders and files gets backed up through iTunes?

Everytime I get a call my old wallpaper shows even though I have a new one. I'm trying to find it on my iOS but I cannot seem to figure out where. So I'm trying to track down what folders gets backed up when i backup my iPhone since I have restored it and it's still there.
(I'm using a jailbroken device)
I know this isn't the actual folder names and etc but it will give you an idea what it's backing up though. Good Luck.
With iOS 1.1 and later
Safari bookmarks, cookies, history,
and currently open pages
Map bookmarks, recent searches, and
the current location displayed in
Maps
Application settings, preferences,
and data
Address Book and Address Book
favorites
Calendar accounts
Wallpapers
Notes
Call history
Mail accounts
YouTube bookmarks
SMS messages
Saved suggestion corrections (these
are saved automatically as you reject
suggested corrections)
Camera Roll (photos and screenshots
taken by the iPhone)
Voicemail token (This is not the
Voicemail password, but is used for
validation when connecting. This is
only restored to a phone with the
same phone number on the SIM card.)
Web clips
Network settings (saved Wi-Fi
hotspots, VPN settings, network
preferences)
Paired Bluetooth devices (which can
only be used if restored to the same
phone that created the backup)
Keychain (this includes email account
passwords, Wi-Fi passwords, and
passwords you enter into websites and
some other applications. The keychain
can only be restored from backup to
the same iPhone or iPod touch. If you
are restoring to a new device, you
will need to fill in these passwords
again.)
With iOS 2.0 and later (in addition to the above)
Managed Configurations/Profiles
List of External Sync Sources (Mobile Me, Exchange ActiveSync)
Microsoft Exchange account configurations
Nike + iPod saved workouts and settings
App Store application data (except the application itself, its tmp and caches folder).
With iOS 3.0 and later (in addition to the above)
Videos in Camera Roll
Per app preferences allowing use of location services
Offline web application cache/database
Voice Memos
Autofill for webpages
Trusted hosts having certificates that cannot be verified
Websites approved to get the location of the device
In-app purchases
New with iOS 3.1: Videos in the Camera Roll that are 2 GB or larger are not backed up (iOS 4 and later will back up videos 2 GB and larger)
All user documents and settings get backed up, Application settings as well as system settings.
Applications each have a Documents folder that user data can be saved to, so thats pretty much what gets backed up for applications, including app preferences.
These are the Wallpaper locations:
/private/var/mobile/Library/SpringBoard/HomeBackground.jpg
/private/var/mobile/Library/SpringBoard/HomeBackgroundPortrait.jpg
/private/var/mobile/Library/SpringBoard/LockBackground.jpg
/private/var/mobile/Library/SpringBoard/LockBackgroundPortrait.jpg
I have manually managed to find out what gets backed up and managed to solve the problem :)
I downloaded the trial of iphone packup extractor http://www.iphonebackupextractor.com/ and found what I was looking for.
Also it seems like I just had to change the lockscreen in the iPhone since the file called LockScreen.jpg was the picture I was looking for but since I had another lockscreen using winterboard I didnt think of this.
Good luck to anyone else who has problems similar to this.

iPhone: Need suggestion for SYNC contact

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.