react native password autofill ios 11

Nick picture Nick · Oct 15, 2017 · Viewed 7.1k times · Source

I've done some research but, at the time of writing, I cannot find any way of a React Native app integrating with the new iOS 11 password autofilling system.

Do we need to use entitlement certificates (as mentioned here: Password AutoFill for iOS App and https://willowtreeapps.com/ideas/password-autofill-in-ios-11)

The part I'm not sure is how that integrates with React Native?!

Answer

Albert Martin picture Albert Martin · Mar 29, 2018

Unfortunately this requires React Native's TextInput to bridge the native UITextContentType. The good news is that there is an open pull request that will add this functionality:

https://github.com/facebook/react-native/pull/18526

Once merged, you can support the password auto-fill like so:

<TextInput
    value={this.state.username}
    textContentType="username"
/>
<TextInput
    value={this.state.password}
    secureTextEntry={true}
    textContentType="password"
/>