IOS 4.2: Access data (contacts, messages, etc) - iphone

Is there a way to programmatically access and modify the core data of the iphone?
I'm making an app for myself, not for the apple store, and I want to be able to access my list of contacts (to delete it) and the list of messages (also to delete it).
I want to make an application with the same behaviour has that feature which allows you to block the iphone in case of theft.
It's being hard to find information about this so any help would be nice :)
/thanks

That's not a particularly helpful answer, because it implies ABAddressBook is going to give you all of the information you want (it isn't). ABAddressBook will give you access to contacts. It won't give you access to messages. Access to SMS and email messages isn't available to developers, for various reasons (privacy, security, etc). So you won't be able to do anything with users messages, because you don't have access to them.

For contact info, use ABAddressBook

Related

Google CardDAV for Contacts - Read Only?

I'm looking to use Google CardDAV to push a set of Contacts tied to a specific Google account out to a bunch of iPhone devices using our MDM software. So far everything works - i pointed the software to https://google.com/carddav/v1/principals/mygoogleaccount and the contacts all populate down to the iPhones. But - any change that any user makes to the contact list will be reflected back to the Google account, meaning it will affect all users. Is there a way to make this functionality read only? Maybe create another account that only has read access to the list and push that to the devices instead of using the main credentials? I could probably disable the ability to edit the contacts on the device level, but I don't want to do this, as employees may wish to add their own personal contacts to their individual devices. I just want the master CardDAV list we are pushing out to stay consistent.
Does anyone have experience or any idea how I would accomplish this?
The above pretty much states it all. Looking to deploy a Contact list to a group of iPhones thru an MDM via Google CardDAV, but need the list to remain read-only at the device level. The Internet does not seem to have any information on how to do this.

Assign ringtone to contact or group of contacts in iphone

I checked the documentation but could not find anywhere regarding assigning ringtone to a group of contacts programmatically. I was wondering is it even possible without using Private API and app store safe ?
My question is the duplicate of this and this but I checked this application, and it does what I was looking for so may be I am overlooking the documentation ?
Any insight on this would be great.
Its not possible to assign contact or group of contact pragmatically for App Store app but you can quietly do for jaibreak app.
Have a look on this.. Is it possible to set the ringtone file(name) for a phone number in a contact using codes?
Old post but still valid In short --
Apple will not allow any Application in app store which modifies user preferences..
Theoretically this is not allowed as per Apple guidelines because you are not allowed to change user preferences through a separate program. That's simply it is. This is specially true for groups since user doesn't have a way to revert the changes done through your program without his permission.
However, the program you have specified here might be using Address Book API methods to retrieve the group they want to change and modifying the ringtone information through a system command by allowing the current user to be root or admin. Just a thought if it can be done.

How to hook text messages in iphone

I'm trying to develope an iphone application which helps for filtering spam text messages.
But I don't know how to hook text messages.
Please help me.
You just can't. iOS API as of today does not give you access to text messages. Not to read them, not to send them, not to filter them. Sorry to break you bad news.
If your phone is jailbroken, you could do it by accessing the SQLITE database where text messages are stored. But you definitely won't be able to distribute your application through AppStore.
In order to do what you are trying to do, you are going to need to hook into the API. It is possible to jailbreak an iPhone without it being identified as 'jail-broken', though it's a bit tricky and a single screw up can deem your HID jailbroken for life.
If you're attempting to make a program usable for any user, this is not the method you want to use.
The only way this would be possible, is through a virus.

Using AddressBook to share information between iPhone apps

I've read that it's possible to share information between iPhone applications using the Addressbook. In fact, TextExpander Touch seems to be able to do just this by looking at their SDK how-to:
http://www.freshblocks.com/tutorials/how-to-add-textexpander-touch-sdk-to-iphone-apps/
Can anyone provide a concrete example of how this is achieved? I've read that it involves creating a 'dummy' contact - but I don't see any such dummy contacts on my phone.
I would instead use inter-app communication using custom app URLs ala: http://mobileorchard.com/apple-approved-iphone-inter-process-communication/
I would imagine polluting a user's address book with dummy contacts would be severely frowned upon by Apple/rejection-worthy.

Verifying the purchaser of an App Store application

Is there a way for the developer of an App Store application to tie a sale to an individual user/device ID/Apple account? In other words, a method for the developer to double-check that a specific user has legally purchased the software?
I haven't been able to find a reliable answer to this yet. I'm not looking for specific code examples, just some sort of idea as to how possible (or difficult) this is.
My intent isn't to penalize piracy; it's to be able to provide additional benefits to paid customers. As such, I'm not looking for a way to identify a cracked or pirated version, which I gather has already been solved.
Thanks in advance for any help you can provide!
None of the answers were all the way there, so I'll summarize.
First, as per Tim's answer, Apple does not give you any information to identify customers of a standard app purchase, or to identify one specific sale from another.
However, using In-App purchases provides you with a method to identify a valid purchaser, directly from Apple. The information you receive in this manner is uniquely identifiable; it doesn't give you a user's device ID and/or Apple Store account, but it can be used to verify a specific transaction.
Apple's documentation on verifying store receipts.
You can roll your own system to do this. You're not permitted to look into Apple's information elsewhere on the phone, but you can let your users create an ID in your system, through your application's interface. Gather the information voluntarily from your customer at the time you have them create their Profile on your system. You can get the Device ID, but you may want to collect something like an email address, too, so that you can continue to provide them with consistent service, as they upgrade to a new iPhone, or add an iPad to their fleet of Cocoa Touch devices.
Be sure to use an encrypted http connection when you're talking to your server, so that you don't accidentally expose your customer's information.
To quote "Dr. Touch"...
AntiCrack contains proven technology
to mitigate the risk of your apps
getting pirated by automatic cracking
tools
You do not have access to any purchaser information from the Apple store. Apple considers these customers THEIR customers, not YOUR customers and so will not make any customer identification information available to you...
-t