如何仅从iPhone联系人中获取WhatsApp联系人? [英] How to fetch only WhatsApp Contacts from iPhone Contacts?

查看:533
本文介绍了如何仅从iPhone联系人中获取WhatsApp联系人?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何仅使用swift从iPhone联系人列表中仅获取WhatsApp联系人。

How can I fetch only WhatsApp contacts from iPhone contact list using swift.

我从手机中获取联系人信息的响应如下:

I fetched contacts information from my phone got following response:

应用程序联系方式

    <CNContact: 0x13bd92310: identifier=04B80557-011F-4437-B132-43E2B0D70CD9, givenName=Tech, familyName=.vijaykart, organizationName=, phoneNumbers=("<CNLabeledValue: 0x170661e80: identifier=579A8A18-F113-4C6E-878A-68D18BFE4A8B, label=_$!<Mobile>!$_, value=<CNPhoneNumber: 0x17023f420: countryCode=in, digits=+919791291980>>"), emailAddresses=(not fetched), postalAddresses=(not fetched)>

非WhatsApp联系人

    <CNContact: 0x13bd808d0: identifier=E09E916A-7829-4288-8731-A3789FA75F18, givenName=Kcm, familyName=Milk, organizationName=, phoneNumbers=("<CNLabeledValue: 0x174264bc0: identifier=CCF42FEB-2062-4425-81B9-1BF9EABE771C, label=_$!<Mobile>!$_, value=<CNPhoneNumber: 0x17422ddc0: countryCode=in, digits=+919443551702>>"),emailAddresses=(not fetched), postalAddresses=(not fetched)>

但无法检测它是否是WhatsApp联系人。

But not able to detect if it's WhatsApp contact or not.

推荐答案

根据@Bittoo的意见,是rit,是不可能的,只能获得WhatsApp联系人,不允许IOS您未经应用程序许可即可在应用程序内获取其他数据,如果假设WhatsApp提供其FB或instagram等sdk,则可能允许您通过其sdk,如果用户手机安装了whatsapp,则可以通过其sdk,他们可能允许您获取他们的联系人。

Yes according to @Bittoo who have commented above is rit, It is not possible to get only WhatsApp contact, IOS Not allowed you to get others data within the app without the apps permission, if suppose WhatsApp provides their sdk like FB or instagram then it may allowed you through their sdk, if user phone has whatsapp installed, then through their sdk, they may allow you to get their contacts.

这篇关于如何仅从iPhone联系人中获取WhatsApp联系人?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆