正在开发第一个 swift 应用程序,并陷入“共享扩展”。尝试将最近通话记录中的电话号码共享到应用程序以执行后台任务。
现在想要获取电话号码和国家/地区代码来执行该任务,当前代码是:
class ShareViewController: UIViewController {
override func viewDidLoad() {
// Want to get selected phone number only and print it on the console for testing
print("Test\n")
}
}
如何做到这一点?
提前致谢
最佳答案
您的应用程序的图标已被使用。来自 Apples documentation :
In iOS, a custom Action extension uses a template image version of its containing app’s icon, which you must provide.
iOS Share extensions automatically employ the containing app’s icon. If you provide a separate icon in your Share extension target, Xcode ignores it. For all other app extension types, you must provide an icon that matches the containing app’s icon.
关于ios - 共享分机以共享最近通话中的号码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44811214/