0

I want to read iPhone's sms history in my app. My application is for my own use (Enterprise distribution without jailbreak) and it's not for apple store so there is no limits for using private frameworks. The solutions I have tested so far are:

  1. Reading the sms database -> Didn't work because of sandbox restrictions.
  2. Using ChatKit; I saw CKConversationList class that has a method -(id)conversations which I guess returns an array of CKConversations. Then I can retreive all the history. The problem is CKConversationList.sharedConversationList().conversations() returns nil when I call it in my app. Although it doesn't return nil when I call it in MobileSMS process (I checked it with a tweak and tested it on a jailbroken phone). I saw a method named +(void)initialize and I called it before calling the above method but it still doesn't work.

IMCore private framework could be used maybe but I don't know how.

Thanks in advanced:)

Hamed
  • 297
  • 3
  • 21
  • http://stackoverflow.com/questions/26642770/get-sms-broadcast-with-text-body-without-jailbreak-but-private-frameworks-in-ios/26643010#26643010 – creker Aug 22 '15 at 14:00
  • @creker, Thanks a lot. I tested your answer and I noticed it returns the last sms. I want to retrieve the chat history for a specific number. I can change the id to gain what I want but it’s not efficient; Do you know a better way? – Hamed Aug 23 '15 at 05:04
  • @creker, Btw is there anyway I can get a callback for any received messages either my app is in foreground or background or even terminated? I have asked it here: http://stackoverflow.com/questions/32033207/ios-8-periodic-background-process-even-after-app-termination – Hamed Aug 23 '15 at 05:06
  • @creker I thought of something that maybe could be a better way of what I am trying to do! I saw that any message that is sent to an iPhone makes MobileSMS app run in the background. I guess it has to do with IMDaemonListener but I can't figure it out. Have you done anything like that? – Hamed Aug 25 '15 at 08:14
  • I don't think you can use those without jailbreak – creker Aug 25 '15 at 12:17
  • @creker There is some information here about Listener Capabilities: http://iphonedevwiki.net/index.php/ChatKit.framework. I think there could be a way that I could register my app from inside itself to be notified when a message is received. Do you know who is responsible for waking MobileSMS up whenever a sms is received? – Hamed Aug 26 '15 at 07:01
  • Most likely `imagent`daemon. It's responsible for handling low level message notifications and feeding them to the rest of the system. You could search for a way to register but it will probably require your app to have special entitlements which require jailbreak. Apple doesn't leave those kind of things unprotected – creker Aug 26 '15 at 14:42
  • I haven't done any research for non-jailbreaken phones apart from my answer above. You will have to reverse engineer it yourself. – creker Aug 26 '15 at 14:43
  • @creker Thank you for your help so far. But can't entitlements been signed on a non-appstore and also non-jailbroken app? – Hamed Aug 27 '15 at 05:58

0 Answers0