How to get SMS from iPhone (xcode)? [closed]

2019-07-18 06:56发布

问题:

I've seen many posts saying it's not possible.
However it is very strange to me that it's possible to jailbreak the phone (which makes Apple lose money), possible to send texts or get requests with xcode (which is potential spamming), but not possible to read texts.
Did any one of you try to do this and succeeded?
After all, iPhone does read the SMS'es, so data is somewhere in there, it's just the matter of getting it out.
Would really appreciate any thoughts about this.


The question is: How do I get Content of all text messages on the iPhone?

回答1:

It most certainly is possible. Since the Jailbreak tag was applied to your question, I assume you're ok with writing an app that requires a jailbroken phone, and won't be submitted to the iTunes App Store.

If so, look at my answer to this other question recently. See the mostRecentSMS method I posted. That only reads the newest SMS, but if you simply modify my sqlite code to loop over all messages (rows), you can get whatever SMS content you want.

(e.g. uncomment the while loop I show there: while (sqlite3_step(statement) == SQLITE_ROW) instead of using the if statement)