Latest 1.2.4
License Commercial
Platforms ios 8.0


Carthage compatible

Note : This repository gives dynamic framework which is supported on iOS 8.0+ only. If you need to support iOS 7.0 also then go to this repository to use static library approach.

How to install

Manually :

Go to Repository release section and download the file from the latest release and unarchive it to get the latest framework file.

Carthage :

Carthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.

You can install Carthage with Homebrew using the following command:

$ brew update
$ brew install carthage

To integrate GetSimpl into your Xcode project using Carthage, specify it in your Cartfile:

github "GetSimpl/simpl-ios-sdk-dist"

Run carthage update to build the framework and drag the built GetSimpl.framework into your Xcode project.

CocoaPods :

CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:

$ gem install cocoapods

To integrate GetSimpl into your Xcode project using CocoaPods, specify it in your Podfile:

pod 'GetSimpl'

Then, run the following command:

$ pod install

iOS Integration

  • Once you have received the SDK, add the GetSimpl framework into your Xcode Project. Make sure to checkmark "Copy items if needed" when Xcode shows the options for adding files.
  • Target -> General -> Embedded Frameworks -> Click on "+" icon to add GetSimpl framework.
  • Go to Build Settings -> Build Options -> Embedded Content Contains Swift Code to YES.
  • Add the following to your Info.plist file:
        // smp + YourMerchantID, like; smp55d72761ec60ytbnk97414182
  • For iOS 9 also add the following to your Info.plist file :

  • In you AppDelegate add the following lines:
  • (BOOL)application:(UIApplication )application openURL:(NSURL )url sourceApplication:(NSString *)sourceApplication annotation: (id)annotation
    { if ([[GSCallBackHandler sharedInstance] canHandleURL:url]) {
    return [[GSCallBackHandler sharedInstance] application:application openURL:url sourceApplication:sourceApplication annotation:annotation] ;

    return YES;

    func application(application: UIApplication, openURL url: NSURL, sourceApplication: String?, annotation: AnyObject) -> Bool
    if GSCallBackHandler.sharedInstance.canHandleURL(url) {
    return GSCallBackHandler.sharedInstance.application(application, openURL: url, sourceApplication: sourceApplication, annotation: annotation)

    return true

  • Developers can toggle between sandbox or production environment like below :
    [GSManager enableSandBoxEnvironment:YES]
  • Go to Target->Build Phase-> Click on + button to add a New Run Script Phase and add following script:

This script loops through the frameworks embedded in the application and

removes unused architectures.

find "$APP_PATH" -name ‘*.framework’ -type d | while read -r FRAMEWORK
FRAMEWORK_EXECUTABLE_NAME=$(defaults read "$FRAMEWORK/Info.plist" CFBundleExecutable)


for ARCH in $ARCHS
    echo "Extracting $ARCH from $FRAMEWORK_EXECUTABLE_NAME"

echo "Merging extracted architectures: ${ARCHS}"
lipo -o "$FRAMEWORK_EXECUTABLE_PATH-merged" -create "${EXTRACTED_ARCHS[@]}"

echo "Replacing original executable with thinned version"


This is needed to circumvent the App Store Submission bug which requires before submission to AppStore, iOS framework binaries must be stripped off back from simulator slices.
There is radar: [Xcode 6.1.1 & 6.2: iOS frameworks containing simulator slices can't be submitted to the App Store]( and a long discussion around it on [Realm#1163]( and [Carthage#188](

## How to use

* Import the Framework :


import <GetSimpl/GetSimpl.h>

import GetSimpl

* Initialise the SDK with your merchantID, typically in your applications didFinishLaunchingOptions method:

[GSManager [email protected]:@"Your merchant id"];

GSManager.initializeWithMerchantID("Your merchant id")

* Check if user is pre-approved:

GSUser user = [[GSUser alloc] initWithPhoneNumber:@"user mobile number" email:@"user email"];
[[GSManager sharedManager] checkApprovalForUser:user onCompletion:^(BOOL approved, BOOL isFirstTransactionOfUser, NSString
buttonText ,NSError *error) {

let user : GSUser = GSUser(phoneNumber :"user mobile number" email:@"user email")
GSManager.sharedManager.checkApprovalForUser(user){(approved:Bool,isFirstTransactionOfUser:Bool,buttonText : String?,error:NSError?)

      Bool approved : If GSUser is pre-approved or not
      Bool isFirstTransactionOfUser : If user has already done transactions previously or not
      String/NSString buttonText : The text to display on Simpl button. If GSUser is pre-approved,this will contain a value specific to merchant with default value of "Buy Now, Pay Later". Will be nil if GSUser is not pre-approved.
      NSError error : Error if any

If the user is approved and merchant should show Simpl button and if the user is not an approved user,do not show the   Simpl button.

* Realtime approval :
For some merchants who prefer to not share data upfront but willing to approve users in realtime by sharing data before transaction may use the approval call like below :

GSUser user = [[GSUser alloc] initWithHashedPhoneNumber:@"hashed value of user phone number"];
user.extraParams = @{@"wallet_balance_in_paise" : @30000,@"transaction_amount_in_paise" : @20000};
[[GSManager sharedManager] checkApprovalForUser:user onCompletion:^(BOOL approved, BOOL isFirstTransactionOfUser, NSString
buttonText ,NSError *error) {

let user = GSUser(hashedPhoneNumber: "hashed value of user phone number")
user.extraParams = ["wallet_balance_in_paise" : 30000,"transaction_amount_in_paise" : 20000]
GSManager.sharedManager.checkApprovalForUser(user){(approved:Bool,isFirstTransactionOfUser:Bool,buttonText : String?,error:NSError?)

extraParams -> Extra properties of GSUser to be set as Key-Value pairs.Example of some keys are transaction_amount_in_paise, wallet_balance_in_paise,failed_transaction_bank_name,user_location,theatre_location,member_since, signed_in , etc.
This property has been provided so that merchants can provide additional parameters for real-time approval without upgrading the SDK.

If merchant is using hashedPhoneNumber to check for pre-approval then the above keys will be used for realtime approval of users provided merchant has realtime configuration enabled on server side. 

* For Simpl button , merchants can use GSButton class given by SDK which can be customized through following properties:


/// Button background color. Defaults to Simpl branding color
@property (nonatomic, strong) UIColor *buttonColor;

/// Button border color. Defaults to Black Color with 10% alpha
@property (nonatomic, strong) UIColor *buttonBorderColor;

/// Title text of button. Defaults to "Buy Now, Pay Later"
@property (nonatomic, copy) NSString *titleText;

/// Title Color of Button. Defaults to White color
@property (nonatomic, strong) UIColor *titleColor;

/// Font of button
@property (nonatomic, strong) UIFont *titleFont;

/// Text color of "Powered by Simpl" text. Defaults to R94 G107 B125 A1
@property (nonatomic, strong) UIColor *poweredByTextColor;

/// Separator line color. Defaults to Black Color with 8% alpha
@property (nonatomic, strong) UIColor *separatorColor;

* On clicking Simpl button, call the following method to start the transaction. This will open an OTP view for the user to enter . In the completion block transaction_token will be returned.

GSUser user = [[GSUser alloc] initWithPhoneNumber:@"user mobile number" email:@"user email"];
transaction = [[GSTransaction alloc] initWithUser:user amountInPaise:500];
[ [GSManager sharedManager] authorizeTransaction:transaction onCompletion:^(NSDictionary jsonResponse, NSError error) {

let user : GSUser = GSUser(phoneNumber :"user mobile number" email :@"user email")
let transaction = GSTransaction(user: user, amountInPaise: 500)
GSManager.sharedManager.authorizeTransaction(transaction) { (jsonResponse : NSDictionary?, error:NSError?) -> Void in

Phone number of GSUser must be set before making authorizeTransaction call.
Once you have the transaction_token, pass it over to your server which in turn can pass the transaction details to Simpl.

Latest podspec

    "name": "GetSimpl",
    "version": "1.2.4",
    "summary": "GetSimpl iOS SDK",
    "homepage": "",
    "source": {
        "git": "",
        "tag": "v1.2.4"
    "license": {
        "type": "Commercial",
        "file": "License"
    "platforms": {
        "ios": "8.0"
    "authors": {
        "Alok Jha": "[email protected]"
    "ios": {
        "vendored_frameworks": "GetSimpl.framework"

Pin It on Pinterest

Share This