iOS app integration

Information on our iOS app integration solution.

Overview

Please see below for information on integrating with Viva Wallet’s iOS POS app.

Get it on the App Store

The Viva Wallet VW POS App for iOS can receive requests for initiating transactions from third-party apps installed on the same iOS mobile device. Communication with the VW POS App is done through the use of URL schemes and by implementing UIApplicationDelegate’s instance method application(_:open:options:) on the AppDelegate file of the client’s app project. The client app should create an URL scheme using specific parameters that will initiate the VW POS App’s pay activity. When the VW POS App’s pay activity finishes it returns the transaction result to the caller app.

ToP (Tap-on-Phone) is for Apple devices with iOS 11 or above

Messages

The client app must implement a mechanism to send messages using URL schemes and to receive the result in a custom URI callback.

Callback activity

The card terminal app will deliver the URL to your app by calling your app delegate’s application(_:open:options:) method. The following code should be added to the method in order to parse the contents of the URL and take the appropriate actions. To ensure the URL is parsed correctly, use NSURLComponents APIs to extract the components.

 func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {

         guard let components = NSURLComponents(url: url, resolvingAgainstBaseURL: true),
             let path = components.path,
             let params = components.queryItems else {
                 print("Invalid URL or path missing")
                 return false
         }
         print("Path: \(path)\nComponents: \(params)")

         //MARK: - Do any additional actions after parsing the data
         return true
  }

  func performInterAppRequest(request: String){
         guard let url = URL(string: request) else { return } // url with constructed parameters
         UIApplication.shared.open(url) { (result) in
             print("InterApp Request URL:\n", url)
             if result {
                 // The URL was delivered successfully!
             }
         }
     }

Get Support

If you would like to integrate with Viva Wallet, or if you have any queries about our products and solutions, please see our Get Support page to see how we can help!