Here you can find instructions on how to integrate and use FriendlyScore Connect for iOS.
To get started quickly with FriendlyScore Connect for iOS, clone the GitHub repository and run the example. You will need to sign-up for the free API keys through our Developer Console.
- Xcode 10 or greater
- iOS 12.0 or greater
- FriendlyScore Client Id
Clone and run the demo project from our GitHub repository.
To integrate, add FriendlyScoreConnect to your Podfile
Then run following command in your project main directory:
CocoaPods will install and embed all sources and dependencies into your app.
Start with importing FriendlyScoreCore and FriendlyScoreConnect framework in your App Delegate:
Then configure Connect in application:didFinishLaunchingWithOptions:
In order to handle redirection properly, add line below to application(_:open:options:) function:
Go to the Redirects section of the FriendlyScore developer console and provide your Bundle Identifier.
You will also need your Client Id for the specific environment (SANDBOX, PRODUCTION).
Navigate to your app target, create new URL Types object and add your bundle identifier to Identifier and URL Schemes field, as below:
Start by importing FriendlyScoreCore:
You can select which environment you want to use the FriendlyScore SDK and select the Client Id for that environment
|sandbox||Use this environment to test your integration|
|production||Use this environment when deploying the live application|
Create the ClientId object
Create the Credentials object using userReference, which is any alphanumeric string that identifies the customer in your systems.
Now, using the myCredentials object, you can present the FriendlyScore SDK anywhere in your code. Usually this can be done after the user's demand, e.g. tapping a button:
FriendlyScoreConnect can be presented with a light (default) or dark theme, which are predefined list of colors and icons.
To use custom colors for the categories, you must override the color keys in your application. Custom theme examples is included in the custom_theme.json. The color keys and descriptions are in the Colors section.
Initiate FriendlyScore View with the options above
|connectBackgroundColor||Background color for all views in the SDK|
|connectDividerColor||Divider color for all view in the SDK|
|connectCancelButtonColor||Background color for Cancel, Disconnect Buttons|
|connectNextButtonColor||Background color for Next, Confirm Button|
|connectButtonTextColor||Text color for Buttons|
|connectBankDetailMarkerColor||Color for the marker on the detail view for a connected bank|
|connectNavigationButtonBackgroundColor||Background color for navigation button in the toolbar|
|connectNavigationBackButtonItems||Color of the back button for the navigation button|
|connectToolbarIconsColor||Color for the search icon in the toolbar|
|connectToolbarTextColor||Color for the search field cursor|
|connectToolbarSearchTextColor||Color for the search text query|
|connectToolbarSearchCursorColor||Color for the search field cursor|
|connectBankItemBackgroundColor||Background color for bank item in the list of banks|
|connectBankItemTextColor||Text color for bank item in the list of banks|
|connectBankItemDisabledTextColor||Text color for bank item if its disabled or not available in the list of banks|
|connectBankItemBorderColor||Border color for the bank item in the list of banks|
|connectedBankItemConnectedStatusColor||Color of the connected status icon for the bank item in the list of banks|
|connectBankItemUnavailableStatusColor||Color of the unavailable status icon for the bank item in the list of banks|
|connectFilterHeaderDisabledColor||Color for the filter header background color|
|connectFilterPageTitleColor||Color for the filter header text color|
|connectFilterPageSubTitleColor||Color for the filter item text color|
If you need to know when the user returns from the FriendlyScore Flow you must handle events
|userClosedView||Present if the customer Closed the FriendlyScore Flow.|
|userCompletedFlow||Present if the customer Completed the FriendlyScore flow.|
If you need to know when the user returns from the FriendlyScore Flow you must handle errors
|userReferenceAuthError||Present if there was an authentication error for the supplied userReference.|
|serviceDenied||Present if service was denied. Please check the description for more information.|
|incompleteConfiguration||Present if the configuration on the server is incomplete. Please check the description for more information.|
|serverError||Present if there was a critical error on the server.|
Was this article helpful?
Friendly Score UK Ltd.
52 Brook Street 1st Floor, Mayfair
London W1K 5DS
Call us on +44 20 3709 6726
Company registered in England
Company number 09168668, ICO ZA111687
VAT registration number 206 9758 80
Authorised and Regulated by the Financial Conduct Authority. (FRN: 821100, 781963)