0

I'm working on iOS app in which I need to integrate touch id and passcode, i googled and found many tutorials for touch id, I followed this and done successfully. Every thing fine but on popup which is saying Enter Password as shown in following pic picture i have few queries.

  • Is it possible to use apple default passcode view as shown in lock screen?
  • If Yes, then will apple allow to upload app onto appstore?

Looking for help. Thanks

Baig
  • 4,737
  • 1
  • 32
  • 47
Aleem
  • 3,173
  • 5
  • 33
  • 71

2 Answers2

3

to hide password option try this..

var LocalAuthentication = LAContext()

LocalAuthentication.localizedFallbackTitle = ""  // Add this line 

tutorial which you have mentioned is using only Biometrics authentication with deviceOwnerAuthenticationWithBiometrics which Indicates that the device owner authenticated using Touch ID refer this .

If you want to authenticate with any of one (Touch id or passcode) , use deviceOwnerAuthentication instead.

replace

[context .evaluatePolicy(LAPolicy.deviceOwnerAuthenticationWithBiometrics ..

with

[context .evaluatePolicy(LAPolicy.deviceOwnerAuthentication  ..
PlusInfosys
  • 3,416
  • 1
  • 19
  • 33
  • I used and works fine, but I want to know is apple encourage to use this, and will apple allow to upload my app into appstore by using this ? – Aleem Nov 21 '16 at 13:50
  • @Aleem, Yes, Appel will allow your app with this. because everything I have mentioned is in apple's public document... refer these links for detail: https://developer.apple.com/reference/localauthentication/lacontext/1514183-localizedfallbacktitle https://developer.apple.com/reference/localauthentication/lapolicy – PlusInfosys Nov 22 '16 at 05:41
  • your provided link doesn't show me that apple will allow app to upload on appstore without any restriction but where I'm confuse is that we are accessing Apple default lock screen within app so could you provide me any hint ? – Aleem Nov 22 '16 at 05:48
  • @Aleem we are not using apple's lock screen, we are using Authentication Method which apple has made public. (Its public API). Apple never reject app for using Public and documented api. It rejects only when we try to use Private api - which is not documented. – PlusInfosys Nov 22 '16 at 06:05
0

We can't use Apple's default lockscreen view inside our apps, However you can use this library on github.

Baig
  • 4,737
  • 1
  • 32
  • 47
  • I would assume that having code resembling Apple's default lock screen in your app will get your app rejected. – gnasher729 Nov 21 '16 at 09:29