UNPKG

@titanium/identity

Version:

⭐ Axway Amplify modules to use Fingerprint authentication, Keychain Access and Face authentication (iOS) with Appcelerator Titanium SDK

30 lines (24 loc) 819 B
'use strict'; exports.id = 'ti.identity'; exports.cliVersion = '>=3.2'; exports.init = function init(logger, config, cli, _appc) { cli.on('build.ios.writeEntitlements', { pre: function (data, finished) { // The team-id-prefix will be generated by the CLI on device builds, // getting the team-id from the provisioning profile. if (cli.argv.target !== 'simulator') { finished(); return; } var applicationIdentifier = '$(AppIdentifierPrefix)' + this.tiapp.id; var plist = data.args[0]; Array.isArray(plist['keychain-access-groups']) || (plist['keychain-access-groups'] = []); if (!plist['keychain-access-groups'].some(function (id) { return id === applicationIdentifier; })) { plist['keychain-access-groups'].push(applicationIdentifier); } finished(); } }); };