Deprecated
This integration doc is deprecated. Please contact Fillr team for the latest version of iOS SDK and please use our V7 integration doc here.
Overview
The Browser SDK provides an easy way to integrate Fillr Autofill in to your own WebView based application, allowing users to populate web forms in your browser.
Prerequisites
Contact us for the Developer Key, Secret Key and SDK information required for the integration.
Getting Started
-
Download the Fillr SDK source project. Please Contact us for download link.
-
Drag
FillrSDK.xcodeproj
file to root level of your project. -
Also drag
FillrSDKBundle.bundle
to root level of your project. -
In Build Phases, add
FillrSDK
project to Target Dependencies. -
In Link Binary With Libraries, click plus button, choose libFillrSDK.a from selection.
-
Add WebKit.framework to Link Binary With Libraries, make it optional to weak link the framework. FillrSDK supports both UIWebView and WKWebView.
-
As of iOS 9, any third party scheme needs to be whitelisted to be used with “canOpenURL”, please add “LSApplicationQueriesSchemes” to your Info.plist and add the value ‘‘fillr” in this array type. More info here.
Add ‘URL types’ in your Info.plist if you haven’t done so, under ‘URL types’ > ‘Item 0’, add your app identifier under ‘URL Schemes’ array.
Enable Fillr on Your Browser Tabs
The Fillr SDK requires your dev key and your url schema identifier to initialise. The url scheme identifier is importat for Fillr app redirect user back to your app.
It is recommended to also initialise the SDK with your own branding including short browser name, long name, and icon. The recommanded short browser name is no more than 12 characters. The long browser name can contain up to 40 characters.
Fillr also requires a reference to current active browser view. If you have multiple browser views e.g. for tabbed browsing, you need to call trackWebview
each time the current active tab changes.
Initialise the Fillr SDK once per app session
Fillr * fillr = [Fillr sharedInstance];
[fillr initialiseWithDevKey:'' andUrlSchema:''];
[fillr setBrowserName:@"Your Browser Name" toolbarBrowserName:@"Your Browser Name"];
Enable the Fillr toolbar on each of your web views.
Call trackWebView once per web view, ideally as soon as the web view is created.
[fillr trackWebview:webView];
Once Fillr has references to the web view, the SDK will take care of detecting webforms in the rendered HTML and prompt the user to autofill when appropriate.
Handle Fillr redirects back to your app
To make Fillr be able to fill a form after redirect back to your browser, you need to call handleOpenURL
in your application delegate as follows:
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url
sourceApplication:(NSString *)sourceApplication annotation:(id)annotation {
if ([[Fillr sharedInstance] canHandleOpenURL:url]) {
[[Fillr sharedInstance] handleOpenURL:url];
return YES;
}
}
Optional Configuration
Enable/Disable Autofill for Users
Your users may want to enable/disable the Fillr Autofill prompt from appearing when they tap in to a form field. This can be achieved as follow:
Set shared preferences:
[[Fillr sharedInstance] setEnabled:enabled];
Get notified of Fillr lifecycle events:
Your browser app can optionally register to listen and handle to Fillr lifecycle events, in most cases you don’t have to.
Just implement FillrDelegate in your class, set Fillr shared instance’s delegate variable to your class. Then implement your delegate method.
Implement FillrDelegate
[Fillr sharedInstance].delegate = self;
- (void)fillrStateChanged:(FillrSessionState)state currentWebView:(UIView *)currentWebView {
if (state == FillrStateDownloadingApp || state == FillrStateOpenApp) {
NSLog(@"Download or open fillr app");
}
}
- (void)onFillrToolbarVisibilityChanged:(BOOL)isVisible isFillrInstalled:(BOOL)isFillrInstalled {
NSLog(@"Visibility of toolbar changed");
}
- (void)onFillrToolbarClicked:(BOOL)isFillrInstalled {
NSLog(@"Fillr toolbar clicked");
}
Test Forms
The following are recommended forms for testing Fillr Autofill and validating your integration. They are easy to access and exercise a good range of fields from the Fillr profile:
- https://psr.slv.vic.gov.au
- https://www.gpcu.org/Applications/Loan-Payment-Form
- https://www.bradford.com.au/onlinepayment.html
Support
For technical support contact product@fillr.com
Draft document only. API subject to change.