xcode 如何在iphone中获取通话记录?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/8656419/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to get call history in iphone?
提问by Harin
In my application i want last 14 days call history. My Requirement is i only need the last 14 days call number which are not save in my address book.
在我的应用程序中,我想要过去 14 天的通话记录。我的要求是我只需要最近 14 天的电话号码,这些电话号码没有保存在我的地址簿中。
so please give me some idea how can i get this calls in my application if it possible.
所以请给我一些想法,如果可能的话,我怎样才能在我的应用程序中得到这个调用。
Thanks in advance
提前致谢
回答by dgund
This methodwill work in iOS 4, but not iOS 5. Since your application is sandboxed, it isn't actually allowed to access phone history. Even if you found a way, it probably would not be allowed into the App Store. It is not possible in the iOS SDK, unless you jailbreak.
此方法适用于 iOS 4,但不适用于 iOS 5。由于您的应用程序已被沙盒化,因此实际上不允许访问电话历史记录。即使你找到了一种方法,它也可能不会被允许进入 App Store。在 iOS SDK 中是不可能的,除非你越狱。
回答by Saurabh Passolia
There is no public API for fetching call history and if you use any other method such as accessing the callHistory.db file directly, you will not be able to submit your app to appstore.
没有用于获取通话记录的公共 API,如果您使用任何其他方法(例如直接访问 callHistory.db 文件),您将无法将您的应用提交到应用商店。