Latest 0.1.0
Homepage https://github.com/emmanuelkehinde/quicksms-ios
License MIT
Platforms ios 8.0
Dependencies Alamofire
Authors

Version
License
Platform

A swift library for QuickSms SMS gateway.

Overview of QuickSms library

QuickSms library will help you achieve the following:

  • Send SMS easily.
  • Check Account Balance.
  • Get Delivery Report.

Simply register at quicksms1.com and you are good to go!

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Installation

QuickSms is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod 'QuickSms'

Using QuickSms library in your iOS application

Import QuickSms

import QuickSms

Initialize QuickSms with your Username and Password

let quickSms = QuickSms.configure(withUsername: "YOUR_EMAIL", password: "YOUR_PASSWORD")

Send SMS

Create an Sms Instance

var sms = Sms()
sms.sender = "Tester"
sms.message = "This is just a test"
sms.recipient = "08000000000"

Passing the sms instance as an argument

quickSms.sendSms(sms: sms).addOnCompleteListener(handler: { (res, err) in
    if res != nil {
        print(res!.totalNumberOfSmsCreditsUsed)
        print(res!.messageId)
    }
    if err != nil {
        print(err!.message)
    }
})
To specify Multiple Recipients
var sms = Sms()
...
...
sms.recipient = "08000000000,08000000001,08000000002"
To specify to deliver to DND numbers
var sms = Sms()
...
...
sms.supportDnd = true
To schedule an sms for later delivery
var sms = Sms()
...
...
sms.schedule = "2018-10-01 12:30:00"

Check Account Balance

quickSms.getAccountBalance().addOnCompleteListener(handler: { (res, err) in
    if res != nil {
        print(res!.balance)
    }
    if err != nil {
        print(err!.message)
    }
})

Get Delivery Report

Passing messageId as argument

quickSms.getDeliveryReport(messageId: "54765").addOnCompleteListener(handler: { (res, err) in
    if res != nil {
        print(res!.status)
    }
    if err != nil {
        print(err!.message)
    }
})

If this library helps you in anyway, show your love :heart: by putting a :star: on this project :v:

Author

Emmanuel Kehinde, [email protected]

License

QuickSms is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "QuickSms",
    "version": "0.1.0",
    "summary": "A swift library for QuickSms SMS Gateway.",
    "description": "A swift library for QuickSms SMS Gateway. Integrating messaging into your app easily.",
    "homepage": "https://github.com/emmanuelkehinde/quicksms-ios",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Emmanuel Kehinde": "[email protected]"
    },
    "source": {
        "git": "https://github.com/emmanuelkehinde/quicksms-ios.git",
        "tag": "0.1.0"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "QuickSms/Classes/**/*",
    "dependencies": {
        "Alamofire": [
            "~> 4.7"
        ]
    }
}

Pin It on Pinterest

Share This