Verbose logging for iOS cert exchange
Summary: Helps debugging cert exchange problems. Reviewed By: lawrencelomax Differential Revision: D43495107 fbshipit-source-id: 499c08ec6ab15a351d74673f0a5edf9abe5af1b1
This commit is contained in:
committed by
Facebook GitHub Bot
parent
8f2ae1cc02
commit
618f58b390
@@ -79,13 +79,26 @@ export default class iOSCertificateProvider extends CertificateProvider {
|
||||
contents: string,
|
||||
csr: string,
|
||||
) {
|
||||
console.debug('iOSCertificateProvider.deployOrStageFileForDevice', {
|
||||
destination,
|
||||
filename,
|
||||
});
|
||||
const appName = await extractAppNameFromCSR(csr);
|
||||
try {
|
||||
await fs.writeFile(destination + filename, contents);
|
||||
} catch (err) {
|
||||
// Writing directly to FS failed. It's probably a physical device.
|
||||
console.debug(
|
||||
'iOSCertificateProvider.deployOrStageFileForDevice -> physical device',
|
||||
);
|
||||
const relativePathInsideApp =
|
||||
this.getRelativePathInAppContainer(destination);
|
||||
|
||||
console.debug(
|
||||
'iOSCertificateProvider.deployOrStageFileForDevice: realtive path',
|
||||
relativePathInsideApp,
|
||||
);
|
||||
|
||||
const udid = await this.getTargetDeviceId(appName, destination, csr);
|
||||
await this.pushFileToiOSDevice(
|
||||
udid,
|
||||
@@ -95,6 +108,8 @@ export default class iOSCertificateProvider extends CertificateProvider {
|
||||
contents,
|
||||
);
|
||||
}
|
||||
|
||||
console.debug('iOSCertificateProvider.deployOrStageFileForDevice -> done');
|
||||
}
|
||||
|
||||
private getRelativePathInAppContainer(absolutePath: string) {
|
||||
|
||||
Reference in New Issue
Block a user