目录
目录README.md

TwilioSwift

This is a work in progress project. Only very specific features have been added as they are needed, and will be extended over time.

Configuration

Import the package into your Swift project by including the package in your Package.swift file:

.package(url: "https://github.com/iamjono/TwilioSwift.git", from: "0.0.1")

Obtain an Account SID and Authentication token from the Twilio console.

In your executable project, for example in your main.swift, set the SID and Authentication Token:

import TwilioSwift

TwilioConfig.accountSid = "{yourSID}"
TwilioConfig.authToken = "{yourToken}"

Current functionality

Sending SMS

Once you have obtained a Twilio phone number, you can now send SMS messages:

let t = Twilio.sendSMS(
    from: "+{twilio_issued_number}", 
    to: "+{country_code}{phone_number}", 
    message: "Hello, World!"
    )
// Output the success/fail message
print(t)
关于
31.0 KB
邀请码
    Gitlink(确实开源)
  • 加入我们
  • 官网邮箱:gitlink@ccf.org.cn
  • QQ群
  • QQ群
  • 公众号
  • 公众号

©Copyright 2023 CCF 开源发展委员会
Powered by Trustie& IntelliDE 京ICP备13000930号