iOS UI Customisation

iOS UI Customisation

This content is archived.
There are a number of pieces of the UI that can be customised in the SDK.  This should be done in conjunction with CSS customisation and Android customisation.  To give the best user experience, you should make your CSS and SDK customisations consistently.  

These instructions are for v 1.x of greenID Mobile iOS SDK.  For the latest  2.x versions, please refer to the new instructions

 

To customise the native iOS user interface, you will need to change various files inside the GIDresources.bundle, inside the IDMetrics frameworks, and sometimes in your app.  

Where possible, we recommend that you make any changes in your own app, rather than changing the GIDresources.bundle directly.  This makes it easier for you to update to later versions of the iOS SDK without losing your local customisations.  

Warning: Before you start customising

When you are customising the SDK UI, there is potential for mistakes to be made.  If you find that your app is inoperable, we may ask you to revert to the original SDK files as a first step in diagnosing any issues,  and to remove any customised UI settings.  

Some customisations on iOS SDK require you to open the IDMetrics frameworks, and change files inside the frameworks.  This means that with each new SDK release, you will need to re-apply your customisations.  We are working with our third party providers to work out a more maintainable method for these customisations.

We will be able to provide advice on customising the UI in the SDK, but there are limitations to what you can change in the UI.  

Note that users may change the font size on their phone.  Where possible the workflow will increase or decrease font size as requested by the user.  If you customise any text strings, keep in mind that it may be displayed at a different size on some users' phones. 

Note that the variables on this page are only some of the more prominent ones available for customising.  Always check the files in the GIDresources.bundle for a complete list of customisable variables for wording, colours, and more.

SDK version 1.21.0 introduced new capabilities to use customisations in your app, rather than requiring changes inside the GIDResources.bundle.  Making changes in your app is the preferred method where available.

1. Changing the loading screen 

The 'Loading' screen will appear throughout the greenID workflow, usually as a cover screen while new parts of the process start or finish.   The text may say "Loading" by default, or sometimes "We're uploading your images".  

Most of the loading screens are part of the native SDK, and can be modified as below.  

Note that some of the loading screens are part of the web view, and as such can be modified using CSS changes.  You should make sure your CSS and native changes are consistent.  


Example loading screen

 

Loading screen - Fonts and colours

From version 1.13.8, the GIDResources bundle includes a settings file called GIDsettings.plist.  This file can be used to configure the colours and font used on the 'Loading' and 'Uploading' progress screens.

From version 1.21.0, you can include a customised copy of the GIDsettings.plist file in your own app.  Rather than editing the file inside the GIDResouces.bundle, you can put a copy in your own app, and the SDK will use values in that file instead of the defaults.  Copy the default file from the bundle, and place your copy in your own project.  Make sure that the new file is included in your build target, so that it gets included in your app build.  

Edit the plist file to change the following: 

Key

Used by

Default value 

Notes

Key

Used by

Default value 

Notes

gid_loadingBackgroundColor

The loading screen background colour

#FFFFFF

Should be an html hex code

gid_loadingFontSize

The loading screen font size

29

 

gid_loadingFontFamily

The loading screen font family

HelveticaNeue-Thin

You can specify any iOS system font here, or include your own custom font file in your app.  See instructions at the bottom of this page in 'More information on iOS customisation.

gid_loadingFontColor

The loading screen font colour

#417505

Colour of the primary text on the loading screen.  This includes things such as "Loading" or "We're uploading your photos" on the loading screen

gid_loadingSecondaryFontColor

The loading screen secondary font color

#AAAAAA

Colour of the text used on slow network connections to display a percentage of the load or upload completed.  

Loading screen - Loading image

The loading screen image is an animated gif file.  The default image is provided in the GIDResources.bundle.  To change this images in your app, replace it with an image of the same name, and rebuild your project.  

From version 1.21.0, you can alternatively add the images directly in your own app project - note that the names are slightly different, to avoid name clashes with any other images you may use in your app.  Make sure that images are added to your project target, so that they will be included when you build your app.  This is the preferred method, so that your changes do not get overwritten with a new SDK release.

Bundle Filename

App Filename (from v.1.21.0)

Used by

Notes

Bundle Filename

App Filename (from v.1.21.0)

Used by

Notes

spinner-grey.gif

gid_spinner-grey.gif

This is the spinner that appears on the 'Loading' and 'Uploading' progress screens. 

Should be an animated gif file.

Loading screen - Text values

To change the text values on the loading screens, add these key/values to a Localizable.strings file in your app.  If you have not set up a Localizable.strings file before, there is more information at the end of this document.   An example localizable.strings file is available on the greenID Mobile release website. 

Key

Used by

Default value 

Key

Used by

Default value 

loading_view_title

Most loading screens

Loading

upload_progress_message

After additional document capture

We\'re uploading your photo. Please wait.

 

2. Changing the camera permission messages

When a user first starts the greenID process, their phone will prompt them for permission to use the camera.  

If they deny permission, they will see a dialog explaining that the process cannot continue without permission. 

The wording on this dialog can be altered by adding key/values into a Localizable.strings file in your app.  

An example localizable.strings file is available on the greenID Mobile release website. 

Camera permissions messages

Key

Used by

Default value

Key

Used by

Default value

camera_access_denied_title

Title of the dialog box

We can't access your camera

camera_access_denied_message

Message in the dialog box

Completing this process successfully requires that you allow access to the camera on your device via Settings.

camera_access_denied_button_title

Button text, to take user to the settings app

Go to Settings

 

3. Changing the document capture UI

The colours, fonts and text of the document capture process can be changed by placing values into two files in your app:  

The Localizable.strings file, and the Document.json file.  

   

Document capture UI

Document capture - colours, fonts, buttons

The colours and fonts of the document capture tool can be modified in a file called Document.json.   This file is located inside the IDMetricsDocumentCapture.framework.   

This file will allow you to change the fonts and colours.  To change the corresponding text, see the section below.

 Note that the colours are in R-G-B-Alpha format. 

If you enter invalid colours or fonts, the capture tool will ignore that and use default values. 

If your json file is malformed, the whole file will be ignored, and default values will be used for all items. 

Modifying this file includes the risk that you may accidentally alter other parts of the capture framework.  Take care when modifying this file.  If your capture tool stops working, you will need to restore to the provided framework files before we can offer any support. 

 

The following customisation options are available in the file.  Some options are not used in a normal greenID mobile workflow and will not be seen in your UI, so they have not been mentioned in this table.  

Key

Used by

Options

Notes

Key

Used by

Options

Notes

icon_got_it

The button on the introduction screen, to start the capture

Font, text size, text colour, background colour

 

icon_close

The image used to cancel the capture

Border appearance for the button

Do not change the icon_name.

icon_camera

The image used for the manual capture button

Border appearance for the button

Only appears for manual capture.  Do not change the icon_name.

icon_help

The image used for the 'help' button

Border appearance for the button

Do not change the icon_name.

instruction_overlay

The background and text of the introduction screen

Font, text size, text colour, background colour

 

indicators

The red 'Glare', 'No face', 'Focus' button colours

Font, text size, text colour, background colour

 

live_overlay

The dialogs that pop up during the capture - for example "Hold steady - Taking 2 photos"

Font, text size, text colour, background colour

 

tooltip

The 'Having some trouble?' text that shows before manual capture

Font, text size, text colour, background colour

Only appears for manual capture

actionbar

The colour for the words 'Auto capture'

Font, text size, text colour, background colour

Only appears in auto capture

brackets

The colour of the 4 brackets surrounding the document to be captured. 

Colour - can be set for when a document is visible or not

Only changes colour when in auto capture mode 

Document capture - Messages, labels, and other text

Text values in the document capture widget can be changed by including values in a Localizable.strings file in your app.  Adding the following key/values will change the following messages.  

These keys and default values are mostly similar to the Android values, but there are some subtle differences - e.g. the 'second_overlay' keys for 'text_line1' on Android is 'text_line2' on iOS.  

If you customise any of these settings, you may find that you need to explicitly set second_overlay_licence_text_line1, second_overlay_passport_landscape_text_line1 and second_overlay_greenId_text_line1 to empty strings in your Localized.strings file.  This is to work around an issue in the third party capture widget that we use.  If you do not set these strings, there may be extra text shown by mistake on the dialog box during capture.  

Due to the implementation of the third party framework that does the capture, you will have to make sure your Localizable.strings file is a proper 'localized' file in Xcode.  The name of the file is not enough, it will have to be localised for a language, which will put it inside a directory named 'en.lproj' or something similar.  

If your strings file is not properly localised, your settings may be ignored. 

An example localizable.strings file that contains some of these keys is available on the greenID Mobile release website. 

Key

Default string

Used by

Key

Default string

Used by

first_overlay_licence_flash_front_text_line1

Align the\nDOCUMENT FRONT\ninside the brackets.

Instructions at start of licence front capture

first_overlay_licence_flash_front_text_line3

HOLD STEADY FOR 2 PHOTOS

Instructions at start of licence front capture

first_overlay_licence_flash_back_text_line1

Align the\nDOCUMENT BACK\ninside the brackets.

Instructions at start of licence back capture

first_overlay_licence_flash_back_text_line3

HOLD STEADY FOR 2 PHOTOS

Instructions at start of licence back capture

second_overlay_licence_text_line1

 

Dialog box that covers screen when the camera is capturing the licence flash image

second_overlay_licence_text_line2

HOLD STEADY

Dialog box that covers screen when the camera is capturing the licence flash image

second_overlay_licence_text_line3

Taking 2 photos

Dialog box that covers screen when the camera is capturing the licence flash image

first_overlay_passport_landscape_flash_text_line1

Align the\nPASSPORT PHOTO PAGE\ninside the brackets

Instructions at the start of a passport capture

first_overlay_passport_landscape_flash_text_line3

HOLD STEADY FOR 2 PHOTOS

Instructions at the start of a passport capture

second_overlay_passport_landscape_text_line1

 

Dialog box that covers screen when the camera is capturing the passport flash image

second_overlay_passport_landscape_text_line2

HOLD STEADY

Dialog box that covers screen when the camera is capturing the passport flash image

second_overlay_passport_landscape_text_line2

Taking 2 photos

Dialog box that covers screen when the camera is capturing the passport flash image

first_overlay_greenId_flash_text_line1

Align the\nPHOTO PAGE\ninside the brackets

Instructions at the start of a South African Booklet capture

first_overlay_greenId_flash_text_line3

HOLD STEADY FOR 2 PHOTOS

Instructions at the start of a South African Booklet capture

second_overlay_greenId_text_line1

 

Dialog box that covers screen when the camera is capturing the South African Booklet flash image

second_overlay_greenId_text_line2

HOLD STEADY

Dialog box that covers screen when the camera is capturing the South African Booklet flash image

second_overlay_greenId_text_line3

Taking 2 photos

Dialog box that covers screen when the camera is capturing the South African Booklet flash image

indicator_focus

Not in focus

Warning text during capture

indicator_glare

Glare detected

Warning text during capture

indicator_face

No face found

Warning text during capture

indicator_movecloser

Move Closer.

Warning text during capture

tooltip_doc_manual_capture_heading

Having some trouble?

Text in dialog that shows just before manual capture

tooltip_doc_manual_capture

Take the photo using\nthe capture button

Text in dialog that shows just before manual capture

alert_doc_cancel_message

Are you sure you want to exit?

Cancel dialog text

alert_doc_cancel_title

Cancel Capture

Cancel dialog heading

alert_doc_positive_button

Yes, I\'m sure

Cancel dialog button text - to cancel

alert_doc_negative_button

No, go back

Cancel dialog button text - to continue capture

doc_capture_label

AUTO\nCAPTURE

Text shown on the side of screen, when auto capture is being attempted

doc_overlay_gotit_button

Got it!

Text on the button on the introduction screen

Document capture reference images

The following images show labels for the keys in the Localizable.strings and Document.json files.  The Localizable.strings keys are shown in blue, and the Document.json keys are shown in yellow.  

 

 

4. Changing the document review screen UI

The document review screen appears immediately after a document capture.  

Some parts of this screen can be customised, starting with the 1.33.0 SDK release.   

Review screens - colours

From version 1.33.0, you can add the following to your copy of GIDsettings.plist 

Edit the plist file to change the following: 

Key

Default

Used by

Key

Default

Used by

gid_id_review_screen_background

#6B6B6B

The background colour of the review screen

gid_id_review_screen_text_please_confirm

#FFFFFF

The text colour of the first line of text ("Please confirm")

gid_id_review_screen_text_color

#D6D6D6

The text colour of the remaining text on the page

Remember to check any colour changes that you make on this screen to ensure that they pass contrast checks for accessibility.  

Review screens - Messages and other text

From version 1.33.0, you can add the following to your copy of Localizable.strings file.  You can use basic HTML to style the text.  

Edit the strings file to change the following: 

Key

Default

Used by

Key

Default

Used by

gid_id_review_screen_confirm_text

Please <b>confirm:</b>

The first line of text

gid_id_review_screen_document_in_focus_confirm_text

It\'s <b>in focus</b>

The 3rd line of text.

gid_id_review_screen_document_no_glare_confirm_text

There\'s <b>enough</b> <b>light</b> but <b>no glare</b>

The 4th line of text.

The 2nd line of text is created programatically, and cannot be changed by the client.  

Review screens - Voiceover text

If you change the messaging on the review screen, you should also change the Voiceover accessibility messaging to match.  

In the  Localizable.strings file, change the following:

Key

Key