1*c4ef02aeSEvan Baconimport UserSettings from '../../../api/user/UserSettings'; 2*c4ef02aeSEvan Bacon 3*c4ef02aeSEvan Bacon/** Get the cached code signing ID from the last time a user configured code signing via the CLI. */ 4*c4ef02aeSEvan Baconexport async function getLastDeveloperCodeSigningIdAsync(): Promise<string | null> { 5*c4ef02aeSEvan Bacon const { developmentCodeSigningId } = await UserSettings.readAsync(); 6*c4ef02aeSEvan Bacon return developmentCodeSigningId ?? null; 7*c4ef02aeSEvan Bacon} 8*c4ef02aeSEvan Bacon 9*c4ef02aeSEvan Bacon/** Cache the code signing ID that the user chose for their project, we'll recommend this value for the next project they code sign. */ 10*c4ef02aeSEvan Baconexport async function setLastDeveloperCodeSigningIdAsync(id: string): Promise<void> { 11*c4ef02aeSEvan Bacon await UserSettings.setAsync('developmentCodeSigningId', id).catch(() => {}); 12*c4ef02aeSEvan Bacon} 13