Go>Sign Mobile SDK Integration
The "Go>Sign Mobile SDK Integration" page is intended for developers who are interested in writing mobile applications which will use the capabilities offered by Go>Sign Mobile SDK. It is assumed that the reader has a basic knowledge of iOS and JSON.
Overview
The Go>Sign Mobile SDK empowers mobile applications to perform authorised remote signing using the authorisation key stored in a user’s mobile device hardware/software. The authorisation key stored in the mobile device is protected with a specified authentication method, i.e. FaceID/Touch ID/Passcode, etc. The Go>Sign Mobile SDK adds security factors via OTPs (Email & SMS) at the time of mobile device registration in the ADSS SAM Service.
In addition, Go>Sign Mobile SDK facilitates the ability to view what is being authorised. At the time of authorisation, an authorisation key is unlocked by providing the same authentication method captured on registration.
The following diagram shows the architecture of the overall Remote Authorised Signing solution and how the Go>Sign Mobile SDK is integrated with the Go>Sign Mobile App.

As shown in the image, Go>Sign Mobile SDK communicates with ADSS RAS to view & sign the pending authorisation.
Authentication methods
Go>Sign mobile SDK sends a request to RAS to authenticate a user, the RAS Service checks the RAS Profile settings to see which type of authentication scheme to use for user authentication. RAS profile settings now providing the OTP Authentication or No Authentication or QR Code Authentication settings in RAS Profile and if its selected, the RAS Service informs the Go>Sign mobile SDK the user will be authenticated using the OTP(s) that he will receive on mobile number or email then it verify and returns access token, if no authentication then it directly returns token and if QR code selected then Go>Sign mobile SDK will launch the mobile’s camera to scan the QR Code and ask the user to login to its Web RA account to get the QR Code and Go>Sign mobile SDK hit verification call to verify if it verified then it returns tokens. So, the following are the options which can be selected from the RAS Profile.
OTP Authentication
Both (SMS and Email)
Only SMS
Only Email
QR Code
No Authentication
OTP authentication
SMS and Email
Authentication through the Go>Sign Mobile SDK requires the user to provide both SMS and Email OTPs when OTP Authentication is enabled and both options are selected in the RAS Profile.
RAS profile GUI:

Go>Sign Mobile SDK presents the OTP dialogue on which the user needs to enter their OTP, which they received on the mentioned Email and Mobile number.
OTP dialogue for SMS and Email

The user enters both OTPs, and the Go>Sign Mobile SDK verifies them when the user taps Verify. Upon successful verification, access and refresh tokens are issued, and the process proceeds to device registration.
SMS
If only SMS is selected in the OTP from the RAS profile.
RAS profile GUI:

OTP sent to mobile, and Go>Sign Mobile SDK presents OTP dialogue with email text field.
OTP dialogue for SMS (iOS)

The user enters the SMS OTP, and the Go>Sign Mobile SDK verifies it when the user taps Verify. Upon successful verification, access and refresh tokens are issued, and the process proceeds to device registration.
Email
If only Email is selected in OTP from the RAS profile.
RAS profile GUI:

OTP sent to email, and Go>Sign Mobile SDK presents OTP dialogue with email text field.
OTP dialogue for Email (iOS)

The user enters the Email OTP, and the Go>Sign Mobile SDK verifies it when the user taps "Verify". Upon successful verification, access and refresh tokens are issued, and the process proceeds to device registration.
QR code
A QR Code Authentication option has been added to the RAS Profile to enable user authentication via QR code. When the Go>Sign Mobile SDK sends an authentication request to RAS, it launches the device’s camera to scan the QR code and prompts the user to log in to their Web RA account to obtain the QR code.
RAS profile GUI

QR Code dialogue (iOS)

No authentication
If "No Authentication" is selected under User Authentication Settings for the Go>Sign Mobile SDK in the RAS Profile.
RAS profile GUI

The Go>Sign Mobile SDK sends an enrollment request to verify the selected authentication method. If no authentication method is configured, the user is directed straight to the device registration process to register their device.
Device registration
The Go>Sign Mobile SDK will display the following screens during the device registration process:


The following screen will be presented when authorisation is required:

Go>Sign Mobile SDK benefits
The key features of Go>Sign Mobile SDK:
Device registration
Authorised Remote Signing features
View pending authorisation request
Sign pending authorisation request
Cancel/Decline pending authorisation request
Branding of the pending authorisation screen
Localisation with RTL (Right to Left) support
Device de-registration
Integration prerequisites
ADSS Server prerequisites
Go>Sign Mobile SDK communicates with the ADSS Server RAS Service using OAuth. Several parameters (User ID, Client ID, Client Secret, RAS Service URL, etc.) are required in Go>Sign Mobile SDK when integrating to view and sign a pending authorisation.
User must be registered in the SAM Service. For more information, click here. Client ID, which acts as a mobile application (integrating Go>Sign Mobile SDK) for the ADSS Server, must be registered and configured to use the RAS Service. For more information, click here.
Go>Sign Mobile SDK prerequisites
To integrate the Go>Sign Mobile SDK, the integrated iOS Application should have the following requirements:
iOS application Deployment Target to be 12.0 or above
iOS application should be a Navigation controller-based application.

Add Go>Sign Mobile SDK to an iOS application project
Native iOS integration
Build settings and framework setup
To use the Go>Sign SDK in an iOS application project, follow the steps below:
Go to Xcode -> New Project -> Select a New Project
After you create a new project, go to the project target and then add “GoSignMobileSDK.framework” and “CryptoAPI.framework” frameworks into Embedded Binaries as shown in the following screenshot.

After adding the framework, drag “GoSignMobileBundle” into your project.

Add the WebKit.framework. Go to Target > General > Linked Frameworks and Libraries, click the + button, search for WebKit.framework, and add it.

Set ENABLE_BITCODE to 'No' in Build Settings.

Set Always Embed Swift Standard Libraries to 'Yes'.

Go>Sign Mobile SDK has the following dependencies of Pods:
pod 'AFNetworking', '~> 2.5.4', :subspecs => ['Reachability', 'Serialization', 'Security', 'NSURLSession', 'NSURLConnection']
pod 'Firebase/Crashlytics' // Optional
// If you are supporting push notifications using Firebase in your app.
pod 'Firebase/Core' // Optional
pod 'Firebase/Messaging' // Optional
Open Info.plist of your project in a text editor, and add the following lines:
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
<key>NSFaceIDUsageDescription</key> // If your device support FaceID
<string>$(PRODUCT_NAME) FaceID use</string>Xcode 11 to Xcode 16.1
Apple introduced SceneDelegate in Xcode 11. However, the Go>Sign Mobile iOS SDK does not currently support SceneDelegate, so the integrated app should remove SceneDelegate entirely from the project.
Delete SceneDelegate.h and SceneDelegate.m files from the project, and move them to the trash.

Add the following lines in AppDelegate.h.
#import <UIKit/UIKit.h> @interface AppDelegate : UIResponder <UIApplicationDelegate> @property (strong, nonatomic) UIWindow *window; @endRemove all the code for UISceneSession from AppDelegate.m.
#pragma mark - UISceneSession lifecycle - (UISceneConfiguration *)application:(UIApplication *)application configurationForConnectingSceneSession:(UISceneSession *)connectingSceneSession options:(UISceneConnectionOptions *)options { // Called when a new scene session is being created. // Use this method to select a configuration to create the new scene with. return [[UISceneConfiguration alloc] initWithName:@"Default Configuration" sessionRole:connectingSceneSession.role]; } - (void)application:(UIApplication *)application didDiscardSceneSessions:(NSSet<UISceneSession *> *)sceneSessions { // Called when the user discards a scene session. // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions. // Use this method to release any resources that were specific to the discarded scenes, as they will not return. }Remove “Application Scene Manifest” key from info.plist.

Xcode 16.2 and above
We have identified compatibility issues when integrating our SDKs with projects using Xcode version 16.2 and above. These issues are primarily due to updates in Firebase SDKs and the inclusion of the JOSESwift library. Ensure that the following Firebase pods are included in your Podfile:
pod 'AFNetworking', '~> 2.5.4', :subspecs => ['Reachability', 'Serialization', 'Security', 'NSURLSession', 'NSURLConnection']
pod 'FirebaseAnalytics'
pod 'FirebaseMessaging'
pod 'FirebaseCrashlytics'
pod 'FirebaseCore'
pod 'FirebaseCoreDiagnostics' # Essential for preventing dyld crashes
pod 'JOSESwift', '~> 2.3'
Flutter Integration
GoSignSDK (iOS) has been updated to ensure full compatibility with Flutter applications. Our implementation allows Flutter apps to seamlessly integrate and consume all GoSignSDK features.
Prerequisites
Existing Flutter project (
flutter createcompleted)Xcode 14 or later
Minimum iOS Deployment Target: 12.0
Podfile configuration
Replace the existing ios/Podfile or create a new Podfile and paste the following pods:
platform :ios, '12.0'
use_frameworks! :linkage => :static
target 'Runner' do
pod 'AFNetworking', '~> 4.0'
pod 'JOSESwift', '= 2.4.0'
pod 'GoSignSDK', :path => '../path_to_sdk'
end
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['ENABLE_BITCODE'] = 'NO'
end
end
endFramework integration
Add the following files to your Xcode project:
GoSignMobileSDK.framework
CryptoAPI.framework
GoSignMobileBundle.bundle
Configure framework settings:
Set both frameworks to "Embed & Sign"
Enable "Always Embed Swift Standard Libraries"
Build settings
ENABLE_BITCODE = NOALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES
Info.plist configuration
Add required permissions to Info.plist:
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
<key>NSFaceIDUsageDescription</key>
<string>$(PRODUCT_NAME) uses FaceID for document authentication</string>Code implementation
GoSign Mobile SDK setup
In the Application AppDelegate or the class where the GoSign Mobile SDK is set up:
@objc class AppDelegate: FlutterAppDelegate {
private var goSignIntegration: GoSignIntegration?
override func application(_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
let controller = window?.rootViewController as! FlutterViewController
let navController = UINavigationController(rootViewController: controller)
window?.rootViewController = navController
goSignIntegration = GoSignIntegration()
goSignIntegration?.initialize(navigationController: navController)
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}
}Initiate GoSignMobile SDK into the Navigation Controller
import Foundation
import UIKit
@objc class GoSignIntegration: NSObject {
private var goSignManager: GoSignManager!
private var navigationController: UINavigationController?
@objc func initialize(navigationController: UINavigationController) {
self.navigationController = navigationController
self.goSignManager = GoSignManager()
self.goSignManager.delegate = self
}
@objc func startAuthorization() {
let clientId = "GoSign-Mobile"
let clientSecret = "Client Secret"
goSignManager.openPendingAuthorisation(
"RAS URL",
userId: "RASUserID",
clientId: clientId,
clientSecret: clientSecret,
andNavigationController: navigationController,
andDelegate: self
)
}
}Build process
Execute the following commands:
• flutter clean
• rm -rf ios/Pods ios/Podfile.lock
• flutter pub get
• cd ios
• pod install
• cd ..
• flutter build ios or #Alternatively, you can build directly from Xcode.Integrating Go>Sign Mobile SDK into an iOS application
The integrated mobile application requires importing the following header file in the code:
#import <GoSignMobileSDK/GoSignManager.h>
Initialization
Go>Sign Mobile SDK comes up with a class “GoSignManager”. This class bridges between the iOS application and Go>Sign Mobile SDK.
The instance method “openPendingAuthorisation” takes parameters (URL, UserID, ClientID, ClientSecret, andNavigationController, and andDelegate) from the iOS application.
GoSignManager * gosignManager = [[GoSignManager alloc] init];
[gosignManager openPendingAuthorisation:<(NSString *)> userId:<(NSString *)> clientId:<(NSString *)> clientSecret:<(NSString *)> andNavigationController:<(UINavigationController *)> andDelegate:<(id)>];Parameter
Description
URL
ADSS RAS Service URL, e.g., https://<IP-Address>:port/adss/service/ras
UserID
Specifies the User ID already registered in the ADSS SAM Service.
ClientID
Specifies the Client ID registered in ADSS Server. This is used to authenticate and identify the application integrating Go>Sign Mobile SDK. For more information, see Client Manager.
ClientSecret
Client Secret generated for a client registered in ADSS Server. For more information, see Advanced Settings.
andNavigationController
A view controller’s navigation reference (the project must be navigation-controller-based, e.g., self.navigationController).
andDelegate
Reference to the current controller (self).
Device registration callback
The Go>Sign Mobile SDK provides callbacks for device registration. To use these in your application, override the methods in the same controller where openPendingAuthorisation is called. When the device is successfully registered, the deviceRegistrationSucceeded method is triggered. In case of an error, the deviceRegistrationFailed method is invoked with the corresponding status code and response object.
-(void)deviceRegistrationSucceeded {
//Device Registration Successful you can do your processing
}
-(void)deviceRegistrationFailed:(id)responseObject andStatusCode:(id)statusCode{
//Device Registration Failed you can do your processing
}Authorisation request callback
The Go>Sign Mobile SDK provides callbacks for pending authorisation requests. To use these in your application, override the methods in the same controller where openPendingAuthorisation is called. The requestAuthorised method is triggered when a request is authorised and returns the status code and response object. Similarly, the requestCancelled method is triggered when a request is cancelled, along with the corresponding status code and response object.
-(void)requestAuthorised:(id)responseObject andStatusCode:(id)statusCode{
//request is authorized you can do your processing
}
-(void)requestCancelled:(id)responseObject andStatusCode:(id)statusCode{
//request is cancelled you can do your processing
}Deregister
GoSignManager * gosignManager = [[GoSignManager alloc] init];
gosignManager.delegate = self;
[gosignManager deRegister];Deregister callback
Deregister Call back triggers call-back events for success and failure. These are the optional methods and the business application can or cannot implement the CallBackListener in the business application controller.
- (void) deRegisterSuccssfulResponse:(id)responseObject andStatusCode:(id)statusCode {}
- (void) deRegisterFailureResponse:(id)responseObject andStatusCode:(id)statusCode {}Classes
This section provides descriptions of the Go>Sign Mobile SDK classes and their respective methods.
GoSignManager
The GoSignManager Class is used to authenticate the user and returns the status to the Mobile application delegator.
GoSignManager Method
Purpose
-(void) openPendingAuthorisation: (NSString*)url userId: (NSString*)userId clientId: (NSString*)clientId clientSecret:(NSString*)clientSecret andNavigationController: (NSString*)navController andDelegate:(id)delegate
This method initializes the Document Manager object with the provided values.UserID – Valid user of the Go>Sign Mobile SDKClientID – App Client IDClient Secret – App Client SecretURL – Base URLnavController – A view controller’s navigation referencedelegate – Current controller reference
-(void)deRegister;
This method will log out the current session and also deregister a device.
+ (void)setLevelOneColor:(NSString *)hexColorName;
Specifies the level one colour of the Mobile SDK. Default colour is #232323.
+ (void)setLevelTwoColor:(NSString *)hexColorName;
Specifies the level two colour of the Mobile SDK. Default colour is #55cf31.
+ (void)setLevelThreeColor:(NSString *)hexColorName;
Specifies the level three colour of the Mobile SDK. Default colour is #e03500.
+ (void)setLevelFourColor:(NSString *)hexColorName;
Specifies the level four colour of the Mobile SDK. Default colour is #2bbc00.
+ (void)setLevelFiveColor:(NSString *)hexColorName;
Specifies the level five colour of the Mobile SDK. Default colour is #ffffff.
+ (void)setLevelSixColor:(NSString *)hexColorName;
Specifies the level six colour of the Mobile SDK. Default colour is #797979.
+ (void)setLevelSevenColor:(NSString *)hexColorName;
Specifies the level seven colour of the Mobile SDK. Default colour is #ffb600.
+ (void)setLevelEightColor:(NSString *)hexColorName;
Specifies the level eight colour of the Mobile SDK. Default colour is #f9da00.
+ (void)setLevelNineColor:(NSString *)hexColorName;
Specifies the level nine colour of the Mobile SDK. Default colour is #b3b3b3.
+ (void)setLevelTenColor:(NSString *)hexColorName;
Specifies the level ten colour of the Mobile SDK. Default colour is #2f2f2f.
+(void)setLevelElevenColor:(NSString *)hexColorName;
Specifies the level eleven colour of the Mobile SDK. Default colour is #007aff.
+(void)setLevelTwelveColor:(NSString *)hexColorName;
Specifies the level twelve colour of the Mobile SDK. Default colour is #ccf1c1.
+(void)setLevelThirteenColor:(NSString *)hexColorName;
Specifies the level thirteen colour of the Mobile SDK. Default colour is #eda240.
+(void)setAuthorisationRequestTitle:(NSString *)title
Sets the title of the Authorisation Request screen.

Localisation
The Go>Sign Mobile SDK supports localisation with Right-to-Left (RTL) language layouts. When the device language is set to Arabic, the Go>Sign SDK automatically adjusts its interface to follow the RTL orientation, as shown in the screenshot below.

Error codes
Error Code
Description
GOSIGN_OTP_DIALOG_ERROR
OTP is required (occurs when OTP authentication fails).
GOSIGN_REMOTE_SIGNING_ERROR_FINGER_PRINT_ENROLL_MSG
You need to enable fingerprint to access this functionality (biometric authentication is not configured on the device).
GOSIGN_REMOTE_SIGNING_ERROR_FINGER_PRINT_HARDWARE_MSG
This device cannot be used for authorising remote signatures because it lacks the required minimum-security features. (SAM configuration requires a biometric feature to protect a mobile authorisation key, but the device does not have biometric capability.)
GOSIGN_REMOTE_SIGNING_DIALOG_SECURITY_CHANGED_IOS
Your device cannot be used for authorising remote signatures because your device security settings have changed — you need to re-login to register this device. (This occurs when the authentication method changes after the device has been registered.)
Branding
The Go>Sign Mobile SDK allows developers to customise the look and feel of the remote authorisation screen. This can be achieved using the methods defined in the GoSign Manager class, as described in the previous chapter. The required colour must be provided in hexadecimal format, for example, setLevelColor(#FFFFFF).
Last updated
Was this helpful?

