How to detect language of the WatchKit voice-to-text input? - ios

I am trying to get some input from the user on the Apple Watch using presentTextInputControllerWithSuggestions. I wonder what happens if user speaks multiple languages – is there a way to detect which language has he spoken?
Also, is there a way to find out what languages are set in his preferences?

Not having a Watch on hand, I don't think anyone here knows. (Edit: this was first posted before the Watch launched.) But even though it'd be really cool if there were dictation software that could guess cual idioma で話しています from word to word, watchOS is no different than iOS in that respect.
In iOS, Siri listens only in the language you set in Settings, and dictation listens only in the language of the active keyboard (whose microphone button you pressed to start dictation).
In watchOS, Siri likewise has a set language. Dictation is based on the keyboard language last used on your paired phone, but you can also change the language during text entry with a force press. That's a user choice for a system service, so it's opaque to the app, just like choice of keyboard is to an iOS app. (You're welcome to perform some sort of text analysis of you want to know what language of text the user has entered.)

Related

Custom Keyboard Full Access Rejection

I had made a custom sticker keyboard. Basically users touches one of the gif images that I have placed on the keyboard, i do a a copy action on that image and then the user pastes it to iMessages. For this to work i need to have user do "Allow Full Access". Without it the copy action doesn't work. Now, my app got rejected with this message
From Apple
25.5 - Keyboard extensions must remain functional with no network access or they will be rejected
25.5 Details We noticed that your keyboard extension does not function when the “Full Access” setting is toggled off.
Is there anything i need to set in my info.plist file? Did the reviewer didn't understand how my app works i.e. need to do rejection appeal or do I need to do something else? Trust me i googled but didn't find much on this topic
Here's the answer to my question that eventually led to my app approval.
It doesn't matter if your app is custom sticker keyboard only. It "must" have "both" alphabet and numeric keyboards. If it doesn't then it will be rejected.
From Apple Review Guidelines
4.4.1 Keyboard extensions have some additional rules.
They must:
Provide keyboard input functionality (e.g. typed characters);
Provide
a method for progressing to the next keyboard;
Remain functional
without full network access;
Provide Number and Decimal keyboard
types as described in the App Extension Programming Guide;

Accessibility voice-over support for different languages which doesn't support in iOS by default?

I'm developing iOS application for the blind people. In the beginning of the application user can select his/her preferred language and according to that app's contents(text) will change to selected language.
App support users who are understand English and Tamil.
I don't have any issues if user selected "English" as proffered language, but I need to know how can I convert "Tamil to Speech" voice over in iOS? ( basically a language doesn't support by default in voice over)
Is there another way to achieve this functionality?

How to get the user input using textfield from Apple watch

I want to design a password screen for my Apple Watch app. UITextField is not supported by WKInterface. How do I design such a screen? Are any APIs or customizations available?
There really isn't a good way to input a password from apple watch. Apple doesn't want you to do this, so even if you find a way to do it, I would bet apple would reject your app. Also take into account that the apple watch locks every time it is removed from your wrist, so you have to type in a password to use your application anyway. However, if you still want to input a password from apple watch, I would suggest building it yourself. Just use the digital crown to flip through the alphabet and add the character to a password string once the user taps it.
You can try to build a calculator like keyboard with groups and buttons.
The closest equivalent to iOS's UITextField is the text input method presented in WatchKit using presentTextInputControllerWithSuggestions:allowedInputMode:completion:
This would seem like a pretty poor way to input a traditional password, given the vagaries of dictation, though you could think about this more flexibly. For instance, what if the required 'password' was to dictate a phrase that included at least three words out of four words that had been pre-set as the passphrase. That would have a fair degree of entropy, but account reasonably for the likelihood that at times one of the dictated words might be mis-recognised by the API.

use iPhone as keyboard wedge with bluetooth

I'm trying to create an application where I can send a string from an iPhone to an active textfield on my mac. I'm coming from a Microsoft background and they call it focus. The active textfield is not part of my application (3rd party).
I tested the concept by creating an iOS app to send a string to a mac via bluetooth. The mac (cocoa app) presents the string, in a label, in an NSWindow.
I want to create a keyboard wedge like a USB device to input the string in a textfield with a Safari webpage open using the active text box. I see there is a CGEventCreateKeyboardEvent in Apple's documentation. My question is can I pass the entire string to a Keyboard event with out having to input each CGKeyCode possibilities, and coding each true/false for keyup and keydown?
I must be missing a better way...
There is no universal "better way", since, unlike Microsoft, Apple knows something about security and is not going to let just any old process out of the blue start manipulating the text entered in some application's text box. However, there is a hole which you can ask the user to open: if the user has granted Accessibility permissions, then you can use the Accessibility API to "see" interface of the target application and to make changes like modifying the text in a text box. That is how applications like Nuance Dragon Dictate for Mac and Smile TextExpander work.

How to set a specific keyboard inside an iPhone app?

In an iPhone app I want the user to do some input in a different language.
For example the user is an English speaker and has his(or her) device set with the English language. When running my app he(or she) will have to input some French and some Japanese.
Is there a way I can bring the proper keyboard from inside the app without forcing the user to change his(or her) usual settings. According to what I have read up to now, I am not sure there is a good answer. I still hope.
Thanks for any tip.
You can usually pick certain keyboards (numeric, email, etc) from the interface-builder-like aspects of UITextFields, so take a peek at the code options for setting those things. You may be able to pick it that way.

Resources