mac os keychain password pops up - ios

after I first learned how to code in swift I tried to run a simple app on my own iphone but I keep getting keychain asking me about a password. till now I've never seen this notification can you tell me what should I type as my keychain password?

Type in your computer password and hit Always Allow. That will get you passed that box and let your app load up on your Iphone.
If you've hit Deny and the box is not popping up anymore but you are still getting the same error message, then all you need to do is shut down your computer and restart. The the box should pop up again, that will give you a second chance to put in your computer password and hit Allays Allow

Related

Why is my iOS App Associated Domain endpoint not being called by Apple?

Following Apple's Password autofill guidelines with App Associated Domains here, I added the apple-app-site-association json file.
My app has that site listed as webcredentials:example.com. My app's bundle id is com.app.App which is listed as one of the apps under webcredentials.apps. The site has an SSL certificate.
In my iOS app I have an email text field with a content type of email (I've also tried username) and I have a password text field with new password (I've also tried password). When I select the email text field I get suggested emails. But when I select the password text field I get the same email QuickType suggestions and I get an error in the console:
Cannot show Automatic Strong Passwords for app bundleID: com.app.App due to error: Cannot save passwords for this app. Make sure you have set up Associated Domains for your app and AutoFill Passwords is enabled in Settings
I have AutoFill Passwords enabled on my device and I've proved that it does work on other apps.
I also never see in the logs that apple is calling my endpoint I provided above.
I verified that my Apple team ID is correct.
I've run out of ideas. Can someone else see what I'm doing wrong? Thanks!
Update:
It works fine on the simulator. The request goes out and the server gets it and it works. On the device it does NOT work.
I turned off the phone and turned it back on and it's working just fine... Really frustrating, I have no idea why it wasn't working, but I do know it was NOT making the network request from the device at all.
I turned off the phone I was testing with and turned it back on and that somehow fixed it... I have no idea why it wasn't working, but I do know it was NOT making the network request from the device at all.

iOS Terminated due to signal 9 on allowing permission [duplicate]

This question already has answers here:
Toggling Privacy settings will kill the app
(2 answers)
Closed 4 years ago.
I am making an iOS app and I am new in iOS world. In this app, I want to access user contacts. Everything is going good and working well. But I experienced a amazing behavior which I have not seen in Android since I am android developer.
In iOS to access user contacts I am using Contacts Framework. I think it is relatively more easy and fast then anyother else in the iOS. However, I did not able to completely take advantage of that. Let me tell you what I did and what Problem did I faced.
What I have done I cask for permission on ViewController and User is prompt with Dialog asking for contacts permission. If user allow permission, everything goes well, but when user dont allow the permission here comes the trouble.
Accessing User contacts are more necessary since My app's whole working and basic business idea is upon user contacts. Now to handle this, when user Do not allow permission I am showing another dialog telling him that He must allow permission so that App can continue, So far so good.
Now I am taking user to settings where he can allow the permission or he can simply go again back. Now checkout 2 cases
CASE 1: When User come on Settings screen and go back again without
allowing permission
When I take user to Settings screen and instead of allowing permission he gets back to my app I try to show him same dialog again to enable permission in every case. This is going good. I mean for testing purpose I repeat same procedure manytimes, I mean I do not allow my self Contacts permission, It takes me to setting scree, from settings screen I get back to my app and again I am able to see same dialog that took me to settings scree. THIS IS FINE
CASE 2: When User is taken to settings screen and he permits the
permission:
Here when user allows the permission I get message in the log that is "Message from debugger: Terminated due to signal 9". And when I get back to my app, it starts over again. Looks like my app gets re-open or crashed being in background.
Important: For this I examined my memory or task anything that is being performed in background, but there is nothing going on in background. My memory size before crashing is 54.78 mb. And I do not think so it is worth worying.
Any one have idea what is going on??
Your app is not crashing its just forced to restart by iOS with new privacy settings. iOS will SIGKILL the app. (it's default behaviour of iOS). You can checkout - WWDC 2012 Session Videos: Privacy Support in iOS and OS X for more info on this.
This does not hold true for Location permissions.
It is expected behaviour. iOS terminates the app when user changes permission for Contacts, Camera, Microphone and Photos (and possibly some others).

iOS fingerprint device PIN Prompt while kSecAccessControlBiometryCurrentSet flag is set

I'm working on a fingerprint Authentication using the keychain methods from iOS and can't manage to not show the pin proposal to be displayed after an error.
I'm using the flag kSecAccessControlBiometryCurrentSet which should only allow biometrics authentication.
So for the first prompt it works well and I didn't get the possibility to enter the passphrase but as soon as an authentication fails, the prompt changes and allow the user to enter his code. I would like to block this and only allow fingerprint authentification through that prompt.
There's the code I'm using: https://github.com/xavistas/cordova-plugin-touch-id/blob/noPinCode/src/ios/TouchID.m
If you have any idea, feel free to share :) !
I finally found the solution but it isn't really trivial.
You have to know that the keychain is never cleared for your application, even if you uninstall it.
So basically, if you tried one time to with a flag, let's say kSecAccessControlUserPresence, until you manually specify that you want to clear the keychain entry, this flag will stay stored.
And basically, even you if you "create the keychain token" each time the user connects to the app, it will not replace the keychain entry.
I hope it will help some of you !

Storing log-in details for Xamarin iOS app

I am getting started with Xamarin iOS and writing an app that requires the user to log in, using their phone number (which can hopefully be pulled from the phone via API). What I would like is the first time they use the app, to see log in and sign up buttons. Sign up takes them through a storyboard to enter information which ends up saving their details in my server database so their account is now open. Log in will check if their phone number is registered and if so, sign them in to the app based on their phone number.
However if the app closes or the phone restarts, I would like them to be automatically logged in the next time they open the app, if they have previously created an account.
I am reading a lot of tutorials on sign up/login screens but none talk about how to have an "automatic" log-in option once they have authenticated, at least until they manually click the log out button. Lots of apps do this so Im sure it should be trivial, can anyone point me in the right direction? Do I have to store a value in the iOS file system or preferences folder structure? Maintain a local iOS DB with these settings?
iOS has a NSUserDefaults class that let's you store small bits of user configuration data in a persistent manner.
You can also use the iOS Keychain to securely store user credentials.

Destroying iOS application programmatically on failed login attempts

My client has come up with a strange requirement. He wants the iOS application to be deleted from the iPad/iPhone on 5 unsuccessful login attempts. I want to tell him that, its just NOT possible. Does anyone know any way of programmatically write a piece of code to self destruct an iOS app ?
At least on non-jailbroken devices this won't be possible. I mean, you can't even close an app without the user explicitly pressing the Home button. Also, the user could just re-download the app, rendering self-destruction moot.
You could - as is common in the Internet - just ban the client's IP or UDID for a while. Or store the number of login attempts on the device and refuse to let the user log in after too many attempts.
You can lock the user out of the application, and delete all of the cached data. But no, you can't erase it.
I suppose you could call abort() on every launch after 5 failed attempts, but I'm not sure you'll get through review if that happens.

Resources