Skip to main content

Customization

We provide customization options, including localisation support, configurable fonts and colors.

Localization

Localization of messages and errors is supported using a String Catalog. The comprehensive list of localised keys is provided below:

KeyEnglish (en)Comment
ozone_nfc_authenticationAuthenticationA section title for authentication details in the NFC result view.
ozone_nfc_errorErrorThe title of an alert that appears when an error occurs.
ozone_nfc_error_invalid_nfc_key_formattingInvalid NFC Key FormattingAn error message displayed when the NFC key formatting is invalid.
ozone_nfc_error_invalid_nfc_tagInvalid NFC TagAn error message displayed when the NFC tag is invalid.
ozone_nfc_error_unexpected_errorUnexpected errorAn error message displayed when there is an unexpected error.
ozone_nfc_error_user_cancelledUser cancelledAn error message displayed when the user has cancelled the process.
ozone_nfc_failedFailedA label that indicates whether the BAC authentication was successful or not.
ozone_nfc_instruction_different_page_subtitleIf you are struggling to scan the NFC chip. Try scanning the front, middle, photo page or inner back pages of your document.A label that instructs the user to try different pages of their passport (subtitle).
ozone_nfc_instruction_different_page_titleTry a different pageA label that instructs the user to try different pages of their passport (title).
ozone_nfc_instruction_hold_still_subtitleWhen the dots are progressing, the phone is scanning the document. Hold the phone and document still.A label that instructs the user to hold their phone still while scanning (subtitle).
ozone_nfc_instruction_hold_still_titleHold phone and document stillA label that instructs the user to hold their phone still while scanning (title).
ozone_nfc_instruction_page_titleHow to scan the NFC chipA label that shows the title of the instructions page.
ozone_nfc_instruction_remove_subtitleRemove any covers or sleeves from your document.A label that instructs the user to remove any document covers (subtitle).
ozone_nfc_instruction_remove_titleRemove any document coversA label that instructs the user to remove any document covers (title).
ozone_nfc_instruction_slide_subtitleSlide your phone slowly up and down the document until you see the dots progress.A label that instructs the user to slide the phone to find the NFC chip (subtitle).
ozone_nfc_instruction_slide_titleSlide phone up and downA label that instructs the user to slide the phone to find the NFC chip (title).
ozone_nfc_instruction_touch_subtitleMake sure the back of your phone and document are touching.A label that instructs the user to touch the phone and document together (subtitle).
ozone_nfc_instruction_touch_titleTouch phone against documentA label that instructs the user to touch the phone and document together (title).
ozone_nfc_noNoA response indicating that the passport data is valid.
ozone_nfc_passport_numberPassport NumberA label for the passport number field.
ozone_nfc_scan_state_authenticatingAuthenticatingA string to indicate that the status of the users scan is authenticating.
ozone_nfc_scan_state_authenticating_with_passportAuthenticating with passportA string to indicate that the status of the users scan is authenticating with passport.
ozone_nfc_scan_state_connection_error_try_againConnection error. Please try again.A string to indicate that the status of the users scan had a problem with the connection and the user should try again.
ozone_nfc_scan_state_hold_phone_near_nfc_passportHold your iPhone near an NFC enabled passport.A string to indicate that the status of the users scan hasn’t started and the user should hold their phone near an NFC enabled passport.
ozone_nfc_scan_state_more_than_one_tag_foundMore than 1 tags was found. Please present only 1 tag.A string to indicate that the status of the users scan has found more than one tag.
ozone_nfc_scan_state_mrz_key_not_validMRZ Key not valid for this document.A string to indicate that the status of the users scan has encountered problem with the MRZ key.
ozone_nfc_scan_state_passport_read_successfullyPassport read successfullyA string to indicate that the status of the users scan has been successful.
ozone_nfc_scan_state_problem_reading_passportSorry, there was a problem reading the passport.A string to indicate that the status of the users scan has been unsuccessful.
ozone_nfc_scan_state_problem_reading_passport_try_againSorry, there was a problem reading the passport. Please try again.A string to indicate that the status of the users scan has been unsuccessful and to try again.
ozone_nfc_scan_state_readingReadingA string to indicate that the status of the users scan is reading the document.
ozone_nfc_scan_state_tag_not_validTag not valid.A string to indicate that the status of the users scan has encountered an invalid tag.
ozone_nfc_start_scanningStart scanningA button which allows the user to start scanning.
ozone_nfc_succeededSucceededA label that indicates whether the BAC authentication was successful or not.
ozone_nfc_yesYesA positive response to a boolean question.

How to Integrate

  1. Add a string catalog to your project.
  2. Include the keys listed above.
  3. Customise the message.
  4. Add additional languages.
  5. Introduce the translated copy for each key.
  6. Register your bundle with the SDK so it uses your catalog instead of the built-in defaults:
OzoneNFCUIAppearance.shared.customBundle = Bundle.main
  1. If your catalog uses a non-default name, set customStringTableName to match:
OzoneNFCUIAppearance.shared.customStringTableName = "MyStrings"
  1. Add an additional string catalog named InfoPlist.xcstrings to your project to localize the Info.plist file of your project.
  2. Add a key named NSCameraUsageDescription to customize the camera permission request message.

Font Customisation

Ozone NFC provides flexible options for customising the typeface, size, and colour of all text elements within the interface.

If you need guidance on integrating custom fonts into your app, refer to Apple’s documentation: Adding a Custom Font to Your App.

Typefaces and Sizes:

The following text elements support custom typefaces and font sizes:

Label TypeAttributeExample
TitletitleFont"How to scan the NFC chip"
HeaderheaderFont"Touch phone against document"
ParagraphparagraphFont"Make sure the back of your phone and document are touching."
ButtonbuttonFont"Start scanning"

Button sizing can also be customised:

AttributeDescription
buttonTextSizeFont size for button labels
buttonBorderRadiusCorner radius of buttons
buttonBorderWidthWidth of button borders

The following colour values can be customised to match your app’s visual identity:

TypeAttributeDefault Value
Title TexttitleColor#000000
Header TextheaderColor#000000
ParagraphparagraphColor#000000
View Controller BackgroundbackgroundColor#FFFFFF
Primary Button BackgroundprimaryButtonColor#00326480
Primary Button Background (Pressed)primaryButtonPressedColor#003264CC
Primary Button TextprimaryButtonTextColor#FFFFFF
Primary Button Text (Pressed)primaryButtonPressedTextColor#FFFFFF
Primary Button BorderprimaryButtonBorderColor#003264
Primary Button Border (Pressed)primaryButtonPressedBorderColor#003264CC

Examples

Setting a custom title font:

let size: CGFloat = UIFont.preferredFont(forTextStyle: .title3).pointSize
let customFont: UIFont = UIFont(name: "Custom-Font", size: size)
OzoneNFCUIAppearance.shared.titleFont = customFont

Updating the Primary Button background colour:

OzoneNFCUIAppearance.shared.set(.primaryButtonColor, uiColor: .red)