Swift: Disable symbols on Phone pad - ios

I'm trying to disable symbols(+, *, #) on phone pad either programmatically or from storyboard. I have been searching for useful resources online but wasn't successful.
Is there any better way to get this done?
EDIT
I'm using a UITextField for which I have set the keyboard type to Phone pad.

You are using the "Phone Pad" keyboard but you don't want the phone pad symbols. The solution is simple - don't use the "Phone Pad" keyboard. Use the "Number Pad" keyboard instead.
Keep in mind though that users can use external keyboards or they can paste text into the text field. So you can't rely on the keyboard to ensure that only certain characters are entered into the field.
You must also do proper validation by implementing the appropriate UITextFieldDelegate method textField:shouldChangeCharactersInRange:replacementString:.

Related

How to read text from custom keyboard from third party apps like skype, whats up and so on?

How to read text from custom keyboard from third party apps like Skype, whats up and so on?
Step1: I have to create custom keyboard in swift ios

Step2: Enable and add custom keyboard in ios device.

Step3: User will open skype and chat using custom keyboard .

Step 4: I need to read text or detect text or get text , user typed text from third party apps like skype , whats up, message and so on.


 Eg: User open skype and chat using custom keyboard like "Hello" . I wants to read text or get text or detect text as Hello using ios swift.
If you have created your own custom keyboard, then you are the one who implemented creating the text from the keyboard -> it should be super easy to record the user input (since you are generating it). E.g., if you generate a character using:
self.textDocumentProxy.insertText(characterString)
Then just at the same moment track that character:
self.textGeneratedInThisSession = self.textGeneratedInThisSession + characterString
Assuming there is textGeneratedInThisSession variable into which you are appending the text.
Moreover, at any moment you can just examine the content of self.textDocumentProxy which gives you the power to find out even the content of the document proxy that was generated by other keyboards, e.g.:
let contentDescription = textDocumentProxy.description
Read more in UITextDocumentProxy documentation.
However, you should know that this is something Apple is very sensitive about. Recording the text and leaking it anywhere might very easily end in rejection of the custom keyboard.

Remove letter upper form keyboard

Is it possible to remove letter upper from keyboard ?
Not if its the standard UIKeyboard. You can roll your own keyboard that does not support uppercase. Alternatively, for an easier solution you can make all text lowercase when entered via a bit of code.
You can create your Custom Keyboard with iOS8 App Extension. Try this tutorial :
http://www.appcoda.com/custom-keyboard-tutorial/
Also check at developer.apple.com :
https://developer.apple.com/library/ios/documentation/General/Conceptual/ExtensibilityPG/Keyboard.html
A custom keyboard replaces the system keyboard for users who want
capabilities such as a novel text input method or the ability to enter
text in a language not otherwise supported in iOS. The essential
function of a custom keyboard is simple: Respond to taps, gestures, or
other input events and provide text, in the form of an unattributed
NSString object, at the text insertion point of the current text input
object.

iOS 8 - Force system keyboard for an input field without using secureTextEntry?

First off - I am a programmer, but I am not an iOS programmer.
Is there a method, besides "secureTextEntry=YES" to force an input field to use the system keyboard?
I'm investigating an uncomfortable behavior in 1Password (I do not work for AgileBits) where all third-party keyboards are disabled app-wide. They have an option to re-enable them, however it's buried in the advanced options and is in no way evident to a user. If you have removed the system keyboards in lieu of a third-party keyboard, you just get an app with no keyboards at all, or only emoji (if installed).
If there's a way to designate a field as requiring the system keyboard, without it being treated as a password, I haven't been able to find it in the iOS documentation… but their doc site isn't the easiest to navigate or search.
UITextField conforms to the UITextInputTraits protocol. This protocol has a keyboardType which you can set as one of the values from the UIKeyboardType enum (found here: https://developer.apple.com/library/ios/documentation/UIKit/Reference/UITextInputTraits_Protocol/index.html#//apple_ref/c/tdef/UIKeyboardType ). You can change this keyboardType in addition to choosing to hide the characters (via secureTextEntry).

Custom keyboard in iphone

Does any one know how to Create custom keyboard in iphone? Pls give me any samples for custom keyboard
Hi you need to try following link. They have explained very well and step by step that how to create Custom Keyboard. http://www.appdesignvault.com/ios-8-custom-keyboard-extension/
But while creating Custom Keyboard there are some limitations you must know:
A Custom Keyboard cannot be used to type into certain text input objects. These include the secure text input objects (any object that has its secureText property set to YES) and phone pad objects (any object that has a keyboard type trait of UIKeyboardTypePhonePad or UIKeyboardTypeNamePhonePad). When the user types in any of these text input objects, the system temporarily replaces your custom keyboard with the system keyboard, and on typing in a non-secure or non-phone pad object, your keyboard resumes.
Input dictation isn’t possible for a custom keyboard since, like all extensions in iOS 8, it has no access to the device microphone.
Selecting text is also not possible. Text selection is under the control of the app that is using the keyboard.
Closely related to the above point, editing menu options i.e. Cut, Copy, Paste are inaccessible. If an app provides an editing menu interface, the keyboard has no access to it.
App developers can reject the use of custom keyboards in their app. This can especially be done in apps that are sensitive to security such as banking apps.
You cannot display key artwork above the top edge of a custom keyboard’s primary view the same way Apple does when you tap and hold a key in the top view.
and very Important you must follow the Apple Extensions guide
https://developer.apple.com/library/ios/documentation/General/Conceptual/ExtensibilityPG/Keyboard.html#//apple_ref/doc/uid/TP40014214-CH16-SW1
Enjoy. Happy coding.!!!

Keyboard recreation for security reason

I need to recreate custom keyboard with four levels: lowercase, uppercase, special characters and special characters when shift is pressed. I do not want to create plist file where will be placed all characters for each level. I am looking for the solution to get it using native framework.
What is the way to get characters set for each level?
Characters set should depend on language. Lets say German layout is different to UK layout.
Answer to the “Why?” question: For security reason as written in iOS Security guid at p.20 it is better to present custom keyboard to the users. As my text field have functionality hide/show password my UITextView can be in the mode not secure.
Once enabled, the extension will be used for any text field except the
passcode input and any secure text view.

Resources