简体   繁体   English

我可以在哪里使用iPhone应用程序在iPhone中找到sms.db文件

[英]where can i find sms.db file in my iphone using iPhone app

I have requirement that is i need to read sms message using in my iphone app. 我的要求是,我需要在iPhone应用程序中阅读短信。 I know this only possible in jailbroken iPhone. 我知道这只有在越狱的iPhone中才有可能。 My iPhone also jailbroken device. 我的iPhone也是越狱设备。 but i not able to get sms.db file. 但我无法获取sms.db文件。 where can i find sms database can any one help me, give me some sample source code. 我在哪里可以找到短信数据库,任何人都可以帮助我,给我一些示例源代码。

sms.db file is located in /private/var/mobile/Library/SMS/sms.db. sms.db文件位于/private/var/mobile/Library/SMS/sms.db. You can simply access it through any favorite program (such as iPhone Explorer) and browse to this location. 您可以通过任何喜欢的程序(例如iPhone Explorer)简单地访问它并浏览到该位置。

Sample Code : 样例代码:

NSString* path = @"/var/mobile/Library/SMS";
NSError* error = nil;
NSArray* files = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:path error:&error];

它位于/var/mobile/Library/SMS/sms.db

Apps run in a sandbox on the iPhone and because of Apple Mobile Security, they do not allow these apps to access private data. 应用程序在iPhone上的沙箱中运行,并且由于Apple Mobile Security的原因,它们不允许这些应用程序访问私有数据。 This is done to protect the owner. 这样做是为了保护所有者。

No one wants a malicious piece of software being ran on their iPhone and reading all their texts. 没有人希望在他们的iPhone上运行恶意软件并阅读其所有文本。 You can, however, run a command on the iPhone or from your computer to copy the files down to a PC. 但是,您可以在iPhone或计算机上运行命令以将文件复制到PC。 This is what iTunes does to backup SMS messages. 这就是iTunes备份SMS消息的方法。

App to private folder communication cannot happen though. 但是,无法进行应用程序与私人文件夹的通信。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使用xcode从iPhone删除sms.db文件。 是否可以向我发送源代码 - how to delete the sms.db file from iPhone using xcode. is it possible the send me the source code 合并来自iOS 4.0.1上运行的1个iPhone 3GS的2个SMS数据库(sms.db),并将输出文件放回iPhone上,而不会导致SMS App崩溃 - Merge 2 SMS databases (sms.db) from 1 iPhone 3GS running on iOS 4.0.1 and putting the output file back on the iPhone without the SMS App crashing sms.db不是iPhone的sms存储位置吗? - sms.db is not the iphone's sms storeage place? 如何在iPhone iOS 6上将SMS.txt文件导入SMS.db文件 - How to import an SMS.txt file into the SMS.db file on iphone ios 6 如何从Linux上的非越狱iPhone提取sms.db - How to extract sms.db from non-jailbroken iphone on linux 在iPhone的哪里找到数据库? - Where to find my DB in my iPhone? 我应该在哪里存储我的iPhone应用程序的SQLite数据库? - Where should I store the SQLite DB for my iPhone app? 我的应用程序可以知道我是否通过通知中心在iPhone上收到短信 - can my app knows that I received a sms on my iphone using Notification Center 在iOS上读取sms.db和call_history.db文件? - Read sms.db and call_history.db file on iOS? 在哪里可以找到我的iPhone应用程序的Core Data持久存储? - Where can I find my iPhone app's Core Data persistent store?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM