TouchId without Passcode feature - swift

I need for my app to login using TouchId, but I don't want the user to select or fallback into Password option. In other words I'd like to hide the 'Enter Password' label in the figure below. Thanks.

The answer is "Yes".You can hide the "Enter password"...
Try the following code snippet,
var LocalAuthentication = LAContext()
LocalAuthentication.localizedFallbackTitle = "" // Add this line
if LocalAuthentication.canEvaluatePolicy(LAPolicy.DeviceOwnerAuthenticationWithBiometrics, error: &errorMsg){
Add this line before checking for the policy....
LocalAuthentication.localizedFallbackTitle = ""
Hope this might help you..

As far as I know there is no way to hide the password option. Although you can use the device passcode as the fall back.
Please note that the terminology "Passcode" and "Password" refers to different thing in TouchID integration.
"Password" is used for LocalAuthentication approach for integrating TouchID and refering to the applications password as fallback method.
While "Passcode" is referring to the passcode to unlock the device and authenticate purchase in app store.To use the method, you have to store some information to the device's keychain and retrieve it via Touch ID authentication.
See more about these two approaches here
iOS 9 Edit
Based on this answer, iOS 9 provide a new option to hide the passcode option.
For iOS 9, two new policies have been added that do not fallback to passcode. These policies are kSecAccessControlTouchIDAny and kSecAccessControlTouchIDCurrentSet

Per documentation from LocalAuthentication.LAContext:
/// Fallback button title.
/// #discussion Allows fallback button title customization. A default title "Enter Password" is used when
/// this property is left nil. If set to empty string, the button will be hidden.
open var localizedFallbackTitle: String?

Related

iOS CallKit: CXProviderConfiguration localizeName is deprecated

Currently, CXProviderConfiguration localizeName is deprecated.
https://developer.apple.com/documentation/callkit/cxproviderconfiguration
let configuration = CXProviderConfiguration(localizedName: "Call")
=> 'init(localizedName:)' was deprecated in iOS 14.0
How can I set its localizeName now?
I want to show the name("Call") in the right-bottom.
If I understood correctly your question, you want to display a custom string below the button with your app icon in the CallKit UI.
Contrary to what I thought and wrote in the comment, the localizedName of CXProviderConfiguration, prior to iOS 14 was used as the label of the button mentioned above.
On iOS 14 and above, instead, is the Product Name that's used for that purpose. You can find it in the build settings of your target, and by default, it's equal to your target name. Keep in mind that it's also the string displayed below your app icon on the home screen.

Return nil when finding path for App Group

I have enabled App Group and created a group called "group.com.classData"
And my code looks like this:
let plistPath3 = FileManager.default.containerURL(forSecurityApplicationGroupIdentifier: "group.com.classData")
print(plistPath3) //returns "nil"
And it returns nil. Why does that happen?
I ran into this error while developing a share extension. It turned out that while I had added the App Group entitlement to the app’s target, I hadn’t added it to the extension’s target. I needed to select the extension from the project/target dropdown list:
Then I clicked on the Capabilities tab and enabled App Groups. The App Group I had created for the application was already in the list; I just needed to check its checkbox. When I ran the app again, containerURL(forSecurityApplicationGroupIdentifier:) returned a non-nil value.
it take my 4 hour to solve it..
in my post pic
clips and clipsKeyBoard must both add
Capability must choose "All" , first time i just chose Release... it's a sad story
enter image description here

Hide password with "•••••••" in a textField

In my app there is a textField where the user have to put is password in and i want that when he enter a character it change it to '•' how can i do this?
You can achieve this directly in Xcode:
The very last checkbox, make sure secure is checked .
Or you can do it using code:
Identifies whether the text object should hide the text being entered.
Declaration
optional var secureTextEntry: Bool { get set }
Discussion
This property is set to false by default. Setting this property to true creates a password-style text object, which hides the text being entered.
example:
texfield.secureTextEntry = true
in Swift 3.0 or Later
passwordTextField.isSecureTextEntry = true
Swift 4 and Xcode Version 9+
Can be set via "Secure Text Entry" via Interface Builder
In Xcode 6.3.1, if you use a NSTextField you will not see the checkbox for secure.
Instead of using NSTextField use NSSecureTextField
https://developer.apple.com/documentation/appkit/nssecuretextfield
I'm guessing this is a Swift/Objective-C change since there is now a class for secure text fields. In the above link it says Available in OS X v10.0 and later. If you know more about when/why/what versions of Swift/Objective-C, Xcode, or OS X this
For SwiftUI, try
TextField ("Email", text: $email)
.textFieldStyle(RoundedBorderTextFieldStyle()).padding()
SecureField ("Password", text: $password)
.textFieldStyle(RoundedBorderTextFieldStyle()).padding()
Programmatically (Swift 4 & 5)
self.passwordTextField.isSecureTextEntry = true
You can do this by using properties of textfield from Attribute inspector
Tap on Your Textfield from storyboard and go to Attribute inspector , and just check the checkbox of "Secure Text Entry" SS is added for graphical overview to achieve same

How to register a custom app opening URL scheme with Xcode 4?

Xcode4 is asking for a huge number of arguments just to make this simple thing possible:
NSString *stringURL = #"twitterriffic://";
NSURL *url = [NSURL URLWithString:stringURL];
[[UIApplication sharedApplication] openURL:url];
What are all these properties for? Why an image? Must I repeat the app identifier here? What role to choose if I want anyone to be able to call this URL to open my app? And what are these Additional url type properties for?
I found no Xcode4-related tutorial how to register such an URL scheme with Xcode 4.
Open "Supporting Files" (folder) on left and click the "YourAppName-Info.plist"
Choose a row like "Bundle creator OS Type Code" and mouse over row and click the (+) symbol
This creates a new row and type "URL types"
Click the arror to left and see Item 0 and you'll rename the value in Item 0 to "URL Schemes" as shown
Then edit the field in Item 0 and type in your prototocol; I typed in "goomzee" as shown
Now if I install this app on my simulator, and open Safari and type "goomzee://" in the address bar it will launch my app.
Yup, this stuff isn't straightforward is it ?
I've outlined the steps required to register a custom URL here:
Custom URLs
But, basically the key to it is setting up a "URL Types" value in your .plist file. Here's what it looks like in XCode 5:
In this example, I've registered the MKB prefix, so now, I can use this new type of URLs in hyperlinks on webpages, and emails (if I read an email in the iPad Mail app):
If a user taps on one of these links, my iPad app will start up, and I can access the full URL string, to extract the other parameters from the URL (eg "DocumentNumber=100")
The only gotcha is that I have yet to work out how to test whether a user has an iPad app installed which can recognise a particular prefix.
If they haven't, and they tap on one of these MKB:// links on their iPad, they'll get an ugly error message:
You can continue to register your custom URL by editing your app's info.plist file (as shown in one of your previous questions). The new editor in Xcode 4 is supposed to be a convenience to make it easier to add the entries - all it is doing is making the same info.plist changes that you would do manually. If you want to use the new editor then you only need to fill in the 'Identifier' and the 'URL Schemes' boxes. You don't need an image, icon or additional URL properties.
The other properties (icon etc) are not well documented but seem to be applicable only on Mac OS X and might be used in the Finder's Get Info dialog to display what types of URL a particular app can open. For example, take a look at the Launch Services Programming Guide.
What you change in that editor is also reflected in your project's info plist file. It takes the form of ProjectName-Info.plist. Hopefully that helps.

login form in iphone native application

I am trying to do the login form I have created two uitextfields for username ,password and one uibutton for login. when I enter password in password textfield I want to display all the text as '*' or any special characters like in the following images
Is there any default ways in sdk to do this or we have to do it logically if any give me some sample codes? Thanks in advance
The UITextInputField conforms to the UITextInputTraits protocol, which means you can use the following to tell it to display "*"s:
[passwordTextInputField setSecureTextEntry:YES];
Open you NIB-File in Interface-Builder, mark your UITextField and open the Inspector (Tools > Inspector). In the very left Tab (Attributes) set the value of "Secure" to TRUE.
See the Screenshot below:
Programmaticaly you can use the following line of Code:
password.secureTextEntry = TRUE
Where password is your UITextField.
You can use [myTextField setSecureTextEntry:YES] which is part of the UITextInputTraits protocol whom UITextField adhere.
Don't know of a "free" way to change the secure character, though.