Setting autofill in Cordova for iOS - ios

I'm pretty new to Cordova dev. and I'm trying to achieve the following.
We have an application, running both on Android and iPhone, written in AngularJS,
under the Cordova framework.
In order to use our application, we require the users to send their phone number,
receive an SMS containing an OTP, type the OTP into a shaped text field, and press
a button for sending the OTP (and receiving an authentication token).
I was asked to enable the simple feature of enabling the application to do that
automatically, meaning it would parse the SMS, feed that input field, and send
the OTP, without any user intervention.
This is pretty easily achieved on Android, using a specific SMS Receive plugin,
but cannot be done in iOS.
However, I saw that it can be achieved semi-automatically on the new iOS versions,
but I have to change the input field type to "one-time-code". I tried to do that
on my Cordova code, and I couldn't achieve that, no matter what I did. I would
like to know how to do it through Cordova, if this can be done, anyway.

You should be able to do this using purely HTML without needing a Cordova plugin or any native iOS code as described here. Just set the autocomplete attribute, not the type attribute, of the input element to one-time-code:
<input id="single-factor-code-text-field" autocomplete="one-time-code" />

In my case it had to contain the word 'code' in the message then space and then the code you want to show. I'm not sure but I think it gets the symbols till the next space because I had more symbols after.
ex: code 123456

Related

Is autofilling with sms code on iOS possible?

Is autofill sms code on iOS possible?
Hello, I am doing a research about autofilling fields with code received via sms.
With flutter package for android it works - when sms comes fields on screen automatically fill with it.
Fot iOS I see the code shows above the keyboard.
Is it possible to make it fill fields just like on android? Without need to show keyborad and press the code from it?
SMS autofill on iOS is done by iOS. Apps aren't involved. They can't see an incoming SMS and they don't see the code shown above the keyboard. It's not "autofill" in that it doesn't automatically type the number. The user must confirm it by tapping the code.
Most of the time, ios judges the best-suited number out of the sms, which it thinks is an OTP, and it's correct. Sometimes it fails, usually with money transaction via credit card, or if the OTP is not six digit.

Swift get OneTimePassword (OTP) in class

I’ve read about how to achieve this using Storyboards and UI text elements and it seems to be pretty straightforward, however, I am building a hybrid app so I need to intercept this OTP in the controller and feed it to another event listener which will pass it to my app, so in this scenario I cannot make use of ios text input fields etc but surely there is a way to hook into the devices capability to recieve and parse it’s value ?
You can't parse security code. It only works this way:
If the system can parse a security code from an SMS message, the
QuickType bar shows the code for up to three minutes after it has been
received. If a security code arrives while the text input view is
selected, the system pushes the incoming code to the QuickType bar.
Reference: Swift Docs
UPD: You can access code once it pasted in UITextField

Integrating Password Manager Into iPhone App

I've noticed a few iPhone apps have started to allow you to use your password manager to sign in. Slack is an example of this:
It looks like there's a link that's triggering a partial version of the share toolbar in Safari which lets you access your favourite password manager's widget. That's all I've been able to figure out so far though.
My question is, how have they got this functionality into their app? I'm primarily developing things using React Native, but if it needs a custom component then that's not a problem.
This is now supported natively by iOS 12+ (and by react-native 0.60+) without the need for an extension.
Documentation for enabling it on iOS is located here on Apple's site.
TLDR is to set the UITextContentType values of .username and .password for your inputs and, optionally, add an associated domain entitlement so your app can share passwords with your website.
The prop for enabling it in React Native is documented here. TLDR there is to provide an autoCompleteType on your TextInput component. The two OSes should handle that properly, though again you will have to add an associated domain if you want to share passwords between your website and app.
You can take a look at generic-password-app-extension which gives you access to password managers. It's provided by the creators of Last Password and 1Password.
You'll obviously need to wrap it with a native component so you can trigger it from your JS code.

NotesUIDocument and NotesDocument Send - one works, one doesn't but, never both

I am working with a calendar and scheduling application. The requirements are to work in Notes and on Blackberry devices. Currently when I do a send using a NotesDocument, it works fine for the first meeting send on all. However, if you update the meeting, it only sends a correct message to the Notes client. The Blackberry will receive a rich text only e-mail. All MIMEs are correct in sending as well.
Changing this to send using NotesUIDocument will work fine for all instances on the Blackberry but, in Notes gives the error:
Part or all of this meeting is already on your calendar. You must decline those entries first before processing this notice.
I'm kind of at a loss here because what works in one won't work in the other. I am using Notes 8.5.1 and BES 5.0.2. Any help is really appreciated.
Have you considered using a MailOptions field (computed to itself and set via code) to control a send on UI save? That's how mailing works reliably with web apps -- it seems to invoke some voodoo to which I am not privy to add all of the jots and tittles to the right messages to the right parts of the system.

On blackberry : making a phonecall within an app on user action without J2ME?

Is there a way of making a phonecall within an application using Browser application development ? (for example using a link with a protocol similar to 'mailto:user#example.com' but that would make phonecalls instead of sending mails.)
If not, is it possible to make phonecalls using the Rapid application development ?
If this an app hosted in a browser, Blackberry respects WAP conventions for encoding a phone number.
Here's an example snipppit for displaying a number that is callable via a Blackberry device:
<a href='wtai://wp/mc;5551231367' title='Call'>555.123.1367</a>
I've been using this approch for some time now and it works for me. When the user clicks the link, a dialog from the OS pops up and asks if you would like to call this number.
Additional Information
I also recommend checking out Blackberry's additional resources on development. Since the current browser is still in the stone age compared to iPhone/Android it's worth seeing what's possible.
http://na.blackberry.com/eng/support/docs/subcategories/?userType=21&category=BlackBerry+Browser

Resources