如何在Web应用程序中访问iPhone通讯录?

时间:2022-03-08 07:15:44

I'm currently developing a web app for my company. In this application, there's a form with input fields containing informations about contacts. I would like to create a button which allows to create a contact in the address book on a click.

我正在为我的公司开发一个网络应用程序。在此应用程序中,有一个表单,其中包含有关联系人信息的输入字段。我想创建一个按钮,允许在点击时在地址簿中创建联系人。

Is there anyway to access the address book with JavaScript or other web language ?

无论如何使用JavaScript或其他网络语言访问地址簿?

For example, on windows and IE we can create an ActiveX object in JavaScript to create contacts in Outlook...

例如,在Windows和IE上我们可以在JavaScript中创建一个ActiveX对象来在Outlook中创建联系人...

Thanks.

谢谢。

2 个解决方案

#1


1  

If this turns out to be possible, I'm eating my Mighty Mouse ..

如果事实证明这是可能的,那我正在吃我的Mighty Mouse ..

I apologize for the slightly unrelated answer

我为稍微无关的答案道歉

P.S: to make this answer slightly more related; you could accomplish this by creating a hybrid between a native application and a web app, where the native app will pop-up the address book and then return its data to the web app.

P.S:使这个答案略微相关;您可以通过在本机应用程序和Web应用程序之间创建混合来实现此目的,其中本机应用程序将弹出通讯簿,然后将其数据返回到Web应用程序。

#2


0  

If you create a link that generates a file in the vCard format, the iPhone version of Safari might recognize it as a contact and automatically launch the address book app when they click on the link.

如果您创建一个生成vCard格式文件的链接,则iPhone版本的Safari可能会将其识别为联系人,并在他们点击该链接时自动启动通讯簿应用程序。

It appears that this would NOT work as of iPhone 2.1 (no vCard support in safari), but it might work in 3.0 - I have seen that people will be able to send vCards via MMS on the iPhone, so maybe they'll work in safari too? I guess you'd just have to try it to find out.

看起来这不适用于iPhone 2.1(在Safari中没有vCard支持),但它可能在3.0中工作 - 我已经看到人们将能够通过iPhone在iPhone上发送vCard,所以他们可能会在野生动物园呢?我想你只需要尝试找出来。

#1


1  

If this turns out to be possible, I'm eating my Mighty Mouse ..

如果事实证明这是可能的,那我正在吃我的Mighty Mouse ..

I apologize for the slightly unrelated answer

我为稍微无关的答案道歉

P.S: to make this answer slightly more related; you could accomplish this by creating a hybrid between a native application and a web app, where the native app will pop-up the address book and then return its data to the web app.

P.S:使这个答案略微相关;您可以通过在本机应用程序和Web应用程序之间创建混合来实现此目的,其中本机应用程序将弹出通讯簿,然后将其数据返回到Web应用程序。

#2


0  

If you create a link that generates a file in the vCard format, the iPhone version of Safari might recognize it as a contact and automatically launch the address book app when they click on the link.

如果您创建一个生成vCard格式文件的链接,则iPhone版本的Safari可能会将其识别为联系人,并在他们点击该链接时自动启动通讯簿应用程序。

It appears that this would NOT work as of iPhone 2.1 (no vCard support in safari), but it might work in 3.0 - I have seen that people will be able to send vCards via MMS on the iPhone, so maybe they'll work in safari too? I guess you'd just have to try it to find out.

看起来这不适用于iPhone 2.1(在Safari中没有vCard支持),但它可能在3.0中工作 - 我已经看到人们将能够通过iPhone在iPhone上发送vCard,所以他们可能会在野生动物园呢?我想你只需要尝试找出来。