Passport SDK Integration Guide: Android, iOS, Flutter and React Native

Passport SDK Integration Guide: Android, iOS, Flutter and React Native

Picking a passport scanning tool is the easy part. The harder part is getting it to work inside your app, on real phones, with real passports, without a string of surprises. A smooth passport SDK integration follows a simple path: prepare the project, ask the user for the right permissions, set up the camera scan, add chip reading, handle the results and test on the phones your customers actually use.

This guide explains that path for the four ways most teams build apps: Android, iOS, Flutter and React Native. It is written for product owners, project managers and developers who want a clear picture of the work involved, without getting lost in jargon. The Passport SDK is the working example, but the steps apply to almost any passport scanning tool. Exact names, settings and version details come from the documentation you receive when you sign up, so this guide focuses on what to do and in what order.

What You Are Adding to Your App

Before the work starts, it helps to know what a passport SDK actually does inside your app. An SDK is simply a ready-made toolkit that adds a feature to your app so you do not have to build it from scratch. A passport toolkit usually does three jobs:

  • Photo scan and text reading: the user takes a photo of the passport photo page. The tool finds the page, reads the printed details and the two lines of coded text at the bottom, and returns neat fields such as name, nationality, date of birth, passport number and expiry date.
  • Chip reading: modern passports contain a tiny chip. The phone can read it by holding it close to the passport, in the same way you tap a phone to pay. The chip holds a protected copy of the details and a clear photo of the holder.
  • Checks for fakes: the tool checks that the numbers add up, looks for signs that the document was altered and, if you choose, compares a selfie with the passport photo.

If you want the bigger picture of how these parts fit together, our post on the Passport SDK architecture explains how scanning, reading and checking are organized, and why that matters for growth and security. It also matters where the work happens, on the phone or on a server, because that affects your privacy notices and your data rules.

Before You Start: A Short Planning Checklist

A little planning up front saves a lot of rework later. Settle these points first:

  1. Which phones you will support. Chip reading needs fairly recent phones. Older iPhones cannot read passport chips at all, and Android phones differ from one model to another. Decide what happens for customers whose phones cannot do it.
  2. Which journey you want. Photo only, photo plus chip, or photo plus chip plus selfie. Each extra step adds a little effort for the customer and a little more confidence for you. Match the journey to how risky your business is.
  3. Where the data goes. Decide whether details are read on the phone or sent to a server, and check what your privacy rules allow. Our comparison of on-device and cloud passport OCR explains the trade-offs.
  4. Your access keys. You will receive a license key that switches the tool on. Plan how to keep it safe, because a key left in a public place is an easy and common mistake.
  5. Test phones and test passports. Collect a mix of real phones and passports from different countries, including older ones. Success on one new phone proves very little.

The Same Steps on Every Platform

Whichever platform you use, the order of work is the same: add the toolkit to your app, switch it on with your key, ask the user for permission to use the camera and chip reader, start the scan, receive the result and handle anything that goes wrong. The sections below cover what is different on each platform.

Android

Android apps give you the most control, and they also bring the most variety, because thousands of different phone models are in use.

1. Add the toolkit. Your developer adds the passport toolkit to the app, following the instructions in your documentation. They should also check that the app supports the minimum Android version the toolkit requires.

2. Declare what the app needs. The app has to tell Android that it will use the camera and the chip reader. It should also say that the chip reader is helpful but not mandatory, so that people with phones that lack one can still install the app.

3. Ask for permission at the right moment. Android asks the user to allow camera access. Ask just before the scan starts, with a short explanation, rather than the moment the app opens.

4. Switch the toolkit on once. Enter your license key early in the app, once, rather than on every screen.

5. Start the scan and collect the result. The toolkit returns the passport details, the results of its checks and any images. Pass these on to the next step in your journey.

6. Guide the chip reading. The chip sits in a different spot on different phones, so tell users to hold the phone against the passport and move it slowly until they feel a vibration. Keep the screen awake, show progress and ask them to stay still.

For the most common problems at this step, see our guide to chip reading errors and fixes on Android and iOS.

iOS

iPhones are more uniform than Android phones, so there is less variety to test. Apple, however, has stricter rules, and chip reading will simply not work if the app is not set up exactly as Apple expects.

1. Add the toolkit. Your developer adds it using whichever method your documentation supports, and checks the minimum iPhone software version.

2. Explain why you need access. Apple requires a short, plain-language message for each permission. You will need one for the camera and one for the chip reader. Vague wording is a common reason Apple rejects an app, so write these messages clearly and honestly.

3. Switch on the chip reading feature. In the app settings, your developer must turn on Apple’s chip reading capability and register the passport chip type that the app is allowed to read. Without this, the iPhone refuses to read the chip, often without a helpful error message.

4. Switch the toolkit on and start the scan. As on Android, enter your license key once, open the scan screen and collect the result when it finishes.

5. Test on a real iPhone. Apple’s test tool on a computer has no camera and no chip reader, so it cannot test a passport journey. You need a physical iPhone, and the app’s signing details must include the chip reading permission. Many teams lose a day to this one setting.

Flutter

Flutter lets one team build one app for both Android and iPhone. The passport toolkit usually arrives as an add-on package that connects the shared app code to the Android and iPhone versions of the toolkit. That is convenient, but it does not remove the setup described above. Both the Android and iPhone parts still need their permissions and settings.

1. Add the package. Your developer adds the passport package to the project and downloads it. If your provider supplies it privately, they will tell you where to find it.

2. Finish the setup for both phones. Complete the Android steps and the iPhone steps from the sections above. Most Flutter problems come from doing one side and forgetting the other.

3. Start the scan from your app. Switch on the toolkit once when the app opens, start the scan and wait for the result. Convert the result into your own simple records, so the rest of your app does not depend on the toolkit’s format.

4. Handle permission answers. Users may say no to the camera. Handle that calmly, explain why it is needed and, if they have blocked it for good, guide them to the phone settings.

5. Plan for the switch between screens. The scan opens its own full screen. When it closes, your app comes back, so make sure nothing is lost and that you handle users who go back without finishing.

React Native

React Native also builds one app for both phone types. It works much like Flutter: a shared layer sits on top of the Android and iPhone versions of the toolkit. Some providers supply a ready-made package, while others expect your team to connect the toolkit themselves.

1. Add the package. Your developer installs it and builds the app for both phone types so the toolkit is properly connected.

2. Do the phone-specific setup first. As with Flutter, the Android and iPhone permissions and settings still need to be done by hand. Do this before building any screens, and make sure both versions of the app build successfully.

3. Start the scan and plan for every outcome. Switch on the toolkit once, start the scan and handle every result: success, the user cancelling, a denied permission and a failed chip read. Each of these should lead to a clear message on screen, never a frozen or blank page.

4. Check compatibility. If your app uses the newest version of React Native, confirm that the passport package supports it before you start.

5. Keep photos light. Moving large images around inside the app is slow and can use a lot of memory on cheaper phones. It is better to pass along a reference to the saved image and load it only when needed.

The Four Platforms Side by Side

AreaAndroidiOSFlutterReact Native
Adding the toolkitAdded to the app projectAdded to the app projectAdded as a package, plus setup on both phone typesAdded as a package, plus setup on both phone types
Camera permissionDeclared and requested from the userNeeds a written explanationBoth of the aboveBoth of the above
Chip reading setupDeclared in the app, guided by the screenNeeds Apple’s special permission switched onBoth of the aboveBoth of the above
Testing on a computerLimited, no chip readingNot possible for camera or chipSame as the phonesSame as the phones
Biggest riskMany different phone modelsMissing Apple settingsForgetting one phone typeConnection and compatibility issues

Which Should You Choose?

The choice usually follows the rest of your app. Building separately for Android and iPhone gives you the shortest path to the toolkit, the clearest error messages and the quickest access to new phone features. Flutter and React Native let one team ship to both stores, which saves effort on the surrounding screens such as sign-up, consent and results.

The trade-off is the extra layer in the middle. It is one more thing to keep up to date, and the scan screen itself is still built the Android or iPhone way. When something fails on a certain phone, your team will end up looking at that deeper layer anyway. If your team is small and your app is already built with Flutter or React Native, use that and set aside time for phone-specific fixes. If passport verification is the heart of your product, building that one part separately for each phone is a sound choice, and it can still sit inside a Flutter or React Native app.

Getting the Passport Scan Right

The photo scan decides how many people finish the journey. A few practical points apply everywhere:

  • Show where to place the passport. An outline on the screen and a short tip about glare, shadows and fingers covering the text make a big difference.
  • Take the photo automatically. Capturing when the page is sharp and fully in view works better than asking users to tap a button at the right moment.
  • Help in dim light. Offer the phone torch and warn users when the picture is too dark.
  • Allow another try. Never make people restart the whole journey after one failed scan.

The two lines of coded text at the bottom of the page are the most dependable part to read, because they use a fixed style and built-in number checks. Our overview of how MRZ technology enhances verification explains why they matter so much, and why they also act as the key that opens the passport chip.

Adding Chip Reading

Chip reading is where many projects either shine or struggle. The chip gives you protected data and a clean photo, which is a big step up from reading printed text alone. To open the chip, the app needs three details from the photo page: the passport number, the date of birth and the expiry date. That is why a good photo scan always comes before the chip step.

Design the chip screen with care:

  • Show a short animation or picture of where to place the phone on the passport.
  • Ask users to take off thick phone cases and hold still until reading ends, which can take several seconds.
  • Show progress, because a silent screen makes people pull away too early.
  • Let users correct the details by hand if the chip does not open, since a single wrong digit from the scan is enough to fail.
  • Offer a clear alternative for phones without a chip reader, or chips that cannot be read.

If you want to understand how the chip is protected, read our explanation of BAC and PACE chip access control.

Planning for Things That Go Wrong

The smooth path is only about a third of the work. Plan for these situations from the start:

  • The user cancels. Treat it as a normal outcome and return to a sensible screen.
  • Permission is refused. Explain why access is needed and show how to change it in settings.
  • The scan takes too long or the picture is poor. Offer another try with a tip that matches the likely cause.
  • The chip cannot be read. Tell the difference between wrong details, a lost connection and a chip that is not supported, and give different advice for each.
  • The passport is expired or invalid. Say so plainly.
  • There is no internet. If any step needs a connection, retry gently instead of failing.

Turn every error from the toolkit into a message your customers and your support team can understand. Keep a simple reference number for troubleshooting, but never record the passport details themselves.

Keeping Phones Fast and Smooth

  • Get ready early. Switch the toolkit on before the user reaches the scan screen, so the camera does not wait.
  • Keep the screen responsive. Do heavy work in the background so the app never looks frozen.
  • Switch things off when done. Close the camera and chip reader as soon as each step ends to save battery.
  • Test on cheaper phones. If the journey works well on an entry-level phone, it will work well everywhere.

Protecting Customer Data

Passport details are highly sensitive personal information, so build the journey with care:

  • Protect your license key. Keep it out of public places and, where possible, supply it from your own secure server.
  • Keep data only as long as needed. Delete the details and images once they have served their purpose.
  • Use secure connections and storage. Anything sent or saved should be encrypted.
  • Keep personal details out of logs. Crash reports and analytics tools should never receive passport information.
  • Confirm important decisions on your own server. A result shown on a tampered phone cannot always be trusted, so for high-risk approvals, make the final decision on a system you control.
  • Be open with customers. Say clearly what you collect, why and for how long, in line with the rules that apply to them.

Testing Before You Go Live

A passport journey involves a real document and a real phone, so it needs hands-on testing. A good plan includes:

  1. Many phones. Cover cheap, mid-range and premium Android phones from several makers, plus newer and older iPhones. Include one with a weak camera and one where the chip reader is hard to find.
  2. Many passports. Try passports from several countries, of different ages and layouts, including worn ones.
  3. Many settings. Bright sun, dim rooms, shiny tables and shaky hands.
  4. Deliberate failures. Refuse permissions, turn off the chip reader, cover the coded text, enter wrong details and switch off the internet halfway through.
  5. The final version. Test the version you will actually publish, not only the test build. Some problems only appear in the final version.
  6. Completion numbers. Track how many people finish the scan, the chip step and the full journey, and where they give up.

A free trial is the ideal time to run most of this, so see our checklist on what to test during a passport SDK trial before you commit.

Common Mistakes to Avoid

  • Testing on one phone only. Cameras and chip readers behave differently between models.
  • Forgetting the final setup. Missing settings or the wrong key can break the published app even when the test version worked.
  • Skipping phone-specific setup in Flutter or React Native. The shared layer does not do it for you.
  • Giving weak instructions. Most failed scans are caused by users, and a better screen would have prevented them.
  • Assuming the chip always works. Always provide an alternative.
  • Moving large photos around. It slows the app and can crash cheaper phones.
  • Recording sensitive details. Debug records that include passport data can leak into other tools.

Going Live: Release Checklist

  • Live license key in place and stored safely.
  • Permission messages reviewed for clarity and honesty.
  • Apple’s chip reading settings confirmed for the published iPhone app.
  • The final Android version tested on several phones.
  • Alternative routes tested for no chip reader, refused permissions and failed scans.
  • Error messages written and the support team briefed.
  • Privacy notice, consent wording and data-keeping rules approved.
  • Tracking in place for completion and drop-off, without personal details.
  • Gradual rollout planned, starting with a small share of users.

Release gradually, watch completion rates and error counts by phone model and software version, and fix the biggest drop-off first. A gradual release catches phone-specific problems that no test lab can predict.

Conclusion

A good passport SDK integration is less about clever engineering and more about careful preparation. Get the setup right on each platform, guide users clearly through the photo and chip steps, plan for every kind of failure and test on real phones with real passports. Flutter and React Native save effort on the shared screens, but they do not remove the Android and iPhone setup, so every team should read those two sections.

Follow the order in this guide and most surprises move from launch week into the testing phase, where they are cheap to fix. When you are ready to start, explore how the Passport SDK fits into your mobile app, and use the Passport SDK architecture guide to plan how scanning, chip reading and checking will grow with your customer base.