0

I am using appcelerator titanium and bencoding. What could be the error with the following code? Error attached below

 var securely = require('bencoding.securely');
    var SecureProperties = securely.createProperties({
            secret : "hidden_dont_tell",
            identifier : "myPropertyIdentifier",
            vi : "$H@Crit1c4L",
             storageType:securely.PROPERTY_TYPE_KEYCHAIN ,
            securityLevel : securely.PROPERTY_SECURE_LEVEL_HIGH
        });
        SecureProperties.setString('String', "p4$$M0RD");

[ERROR]:Unable to set value to keychain Error Domain=com.samsoffes.sskeychain Code=-50 "errSecParam" UserInfo={NSLocalizedDescription=errSecParam}

Lakindu Gunasekara
  • 4,221
  • 4
  • 27
  • 41

1 Answers1

0

Use storage type as PROPERTY_TYPE_PREFERENCES instead

Jai
  • 36
  • 8
  • thanks for reply. But after using above preferences ,will it store the password into keychain. – Abhishek Rohan Jan 19 '18 at 11:40
  • Hello, This issue is happening only for simulator build. so you can use PROPERTY_TYPE_PREFERENCES for use just simulator build. Password will store into keychain with PROPERTY_TYPE_KEYCHAIN , If you run this application in real device Issue. Thanks. – Jai Feb 12 '18 at 08:35
  • I have followed this link - https://github.com/benbahrenburg/Securely/issues/48 and working fine PROPERTY_TYPE_KEYCHAIN for Simulator build. – Jai Feb 14 '18 at 07:54
  • Great...if my answer helped you please accept it as the answer. – Jai Feb 19 '18 at 09:30