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,
|
contents: string,
|
||||||
csr: string,
|
csr: string,
|
||||||
) {
|
) {
|
||||||
|
console.debug('iOSCertificateProvider.deployOrStageFileForDevice', {
|
||||||
|
destination,
|
||||||
|
filename,
|
||||||
|
});
|
||||||
const appName = await extractAppNameFromCSR(csr);
|
const appName = await extractAppNameFromCSR(csr);
|
||||||
try {
|
try {
|
||||||
await fs.writeFile(destination + filename, contents);
|
await fs.writeFile(destination + filename, contents);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
// Writing directly to FS failed. It's probably a physical device.
|
// Writing directly to FS failed. It's probably a physical device.
|
||||||
|
console.debug(
|
||||||
|
'iOSCertificateProvider.deployOrStageFileForDevice -> physical device',
|
||||||
|
);
|
||||||
const relativePathInsideApp =
|
const relativePathInsideApp =
|
||||||
this.getRelativePathInAppContainer(destination);
|
this.getRelativePathInAppContainer(destination);
|
||||||
|
|
||||||
|
console.debug(
|
||||||
|
'iOSCertificateProvider.deployOrStageFileForDevice: realtive path',
|
||||||
|
relativePathInsideApp,
|
||||||
|
);
|
||||||
|
|
||||||
const udid = await this.getTargetDeviceId(appName, destination, csr);
|
const udid = await this.getTargetDeviceId(appName, destination, csr);
|
||||||
await this.pushFileToiOSDevice(
|
await this.pushFileToiOSDevice(
|
||||||
udid,
|
udid,
|
||||||
@@ -95,6 +108,8 @@ export default class iOSCertificateProvider extends CertificateProvider {
|
|||||||
contents,
|
contents,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
console.debug('iOSCertificateProvider.deployOrStageFileForDevice -> done');
|
||||||
}
|
}
|
||||||
|
|
||||||
private getRelativePathInAppContainer(absolutePath: string) {
|
private getRelativePathInAppContainer(absolutePath: string) {
|
||||||
|
|||||||
Reference in New Issue
Block a user