Titanium JIRA Archive
Appcelerator Community (AC)

[AC-5224] TiTouchID module: -34018 error when trying to save key

GitHub Issuen/a
TypeBug
Priorityn/a
StatusResolved
ResolutionNot Our Bug
Resolution Date2017-09-22T13:07:15.000+0000
Affected Version/sn/a
Fix Version/sn/a
Componentsn/a
Labelsn/a
ReporterAlberto Marcone
AssigneeShak Hossain
Created2017-09-22T07:16:04.000+0000
Updated2017-09-22T13:07:15.000+0000

Description

Creating an empty project and running the example provided: var keychainItem = TouchID.createKeychainItem({ ... }); keychainItem.addEventListener('save', function(e) { Ti.API.info(e); }); I get the error: [INFO] : { [INFO] : bubbles = 1; [INFO] : cancelBubble = 0; [INFO] : code = "-34018"; [INFO] : error = "-34018 (Code: -34018)"; [INFO] : source = "[object TiTouchidKeychainItem]"; [INFO] : success = 0; [INFO] : type = save; [INFO] : }

Attachments

FileDateSize
Schermata 2017-09-22 alle 14.29.55.png2017-09-22T12:30:42.000+000054884

Comments

  1. Hans Knöchel 2017-09-22

    The error suggests that you are missing entitlements, see [here](https://www.osstatus.com/search/results?platform=all&framework=all&search=34018) for more infos. Your entitlements need to have the keychain-access-groups entitlement included, although it usually should be injected by the module already. Example of the tiapp.xml:
       <entitlements>
       <dict>
       	<key>keychain-access-groups</key>
       	<array>
       		<string>$(AppIdentifierPrefix)com.yourteam.yourapp</string>
       	</array>
       </dict>
       </entitlements>
       
    Please let us know which Ti.TouchID version you use and if possible, attach a quick sample project to reproduce. Did this not happen or prior SDK- and/or Xcode/iOS versions? This would help tremendously! *EDIT*: [This example project](https://www.dropbox.com/s/ibfjh8s1bg7m2li/touchidtest.zip?dl=0) works for me, please check it out. See more here: - https://forums.developer.apple.com/thread/4743?tstart=0 - https://stackoverflow.com/questions/38456471/secitemadd-always-returns-error-34018-in-xcode-8-in-ios-10-simulator - https://stackoverflow.com/questions/22082996/testing-the-keychain-osstatus-error-34018
  2. Alberto Marcone 2017-09-22

    Thank you for your help. I decided to run it and read the complete error, and there it was:
       Code=-34018 "explicit accessGroup <YOU-APP-IDENTIFIER-PREFIX>.com.xxx not in client access (
           "6E5M3DGMBx.com.xxx",
           "6E5M3DGMBx.com.xxx",
           "com.apple.token"
       )"
       
    I thought I had edited the identifier in the code, but apparently I didn't. Thank you very much anyways.

JSON Source