GroupMe如何验证我的电话号码? [英] How Did GroupMe verify my number?

查看:467
本文介绍了GroupMe如何验证我的电话号码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个需要用户电话号码的iPhone应用程序。从我读过的内容(例如以编程方式获取自己的电话号码在iOS )中,设备的电话号码在应用程序的容器中不可用。我总是让用户输入他或她自己的号码。但是当我有一天加入GroupMe时,在点击开始使用按钮后,我的手机打开了一条草稿短信,发送到美国地区代码编号发送此文本以验证您的电话号码(b2bd308eb7)发送文本后,应用程序知道我的号码....如何实现这样的系统?

I am working on an iPhone application where I need the user's phone number. From what I've read (here for instance - Programmatically get own phone number in iOS), the device's phone number is not available within your application's container. I've always had the user enter his or her own number. But when I joined GroupMe the other day, after clicking the Get Started button, my phone opened up a drafted text message to some US area code number "Send this text to verify your phone number(b2bd308eb7)" After I sent the text, the app knew my number....how does one implement a system like this?

推荐答案

GroupMe所做的是使用MessageUI Framework(http://developer.apple.com/library/ios/#DOCUMENTATION/MessageUI/Reference/MessageUI_Framework_Reference/_index.html )发送发送给他们服务器的短信。

What GroupMe does is use the MessageUI Framework ( http://developer.apple.com/library/ios/#DOCUMENTATION/MessageUI/Reference/MessageUI_Framework_Reference/_index.html) to send a text message to their servers.

基本上它是这样的:


  1. 该应用程序已打开并调用服务器。

  2. 服务器响应代码 b2bd308eb7

  3. 应用程序通过短信将该代码发送到服务器。

  4. 服务器获取代码和您的电话号码(来自短信)并确认。

  5. 您的电话号码和应用已连接!

  1. The app is turned on and calls the server.
  2. The server responds with a code b2bd308eb7.
  3. The app sends that code via SMS to the server.
  4. The server gets the code and your phone number (from SMS) and confirms them.
  5. Your phone number and app are connected!

这篇关于GroupMe如何验证我的电话号码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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