@@ -14,27 +14,28 @@ export class PublishIOS implements ICommand {
1414 private $prompter : IPrompter ,
1515 private $devicePlatformsConstants : Mobile . IDevicePlatformsConstants ,
1616 private $platformValidationService : IPlatformValidationService ,
17- private $platformBuildService : IPlatformBuildService ,
18- private $xcodebuildService : IXcodebuildService ) {
17+ // private $platformBuildService: IPlatformBuildService,
18+ // private $xcodebuildService: IXcodebuildService
19+ ) {
1920 this . $projectData . initializeProjectData ( ) ;
2021 }
2122
22- private get $platformsData ( ) : IPlatformsData {
23- return this . $injector . resolve ( "platformsData" ) ;
24- }
23+ // private get $platformsData(): IPlatformsData {
24+ // return this.$injector.resolve("platformsData");
25+ // }
2526
2627 // This property was introduced due to the fact that the $platformService dependency
2728 // ultimately tries to resolve the current project's dir and fails if not executed from within a project
28- private get $platformService ( ) : IPlatformService {
29- return this . $injector . resolve ( "platformService" ) ;
30- }
29+ // private get $platformService(): IPlatformService {
30+ // return this.$injector.resolve("platformService");
31+ // }
3132
3233 public async execute ( args : string [ ] ) : Promise < void > {
3334 let username = args [ 0 ] ;
3435 let password = args [ 1 ] ;
3536 const mobileProvisionIdentifier = args [ 2 ] ;
3637 const codeSignIdentity = args [ 3 ] ;
37- let ipaFilePath = this . $options . ipa ? path . resolve ( this . $options . ipa ) : null ;
38+ const ipaFilePath = this . $options . ipa ? path . resolve ( this . $options . ipa ) : null ;
3839
3940 if ( ! username ) {
4041 username = await this . $prompter . getString ( "Apple ID" , { allowEmpty : false } ) ;
@@ -55,40 +56,45 @@ export class PublishIOS implements ICommand {
5556 this . $options . release = true ;
5657
5758 if ( ! ipaFilePath ) {
58- const platform = this . $devicePlatformsConstants . iOS ;
59+ // const platform = this.$devicePlatformsConstants.iOS;
5960 // No .ipa path provided, build .ipa on out own.
60- const preparePlatformData : IPreparePlatformData = {
61- release : this . $options . release ,
62- useHotModuleReload : false ,
63- env : this . $options . env ,
64- } ;
65- const buildConfig : IBuildConfig = {
66- projectDir : this . $options . path ,
67- release : this . $options . release ,
68- device : this . $options . device ,
69- provision : this . $options . provision ,
70- teamId : this . $options . teamId ,
71- buildForDevice : true ,
72- iCloudContainerEnvironment : this . $options . iCloudContainerEnvironment ,
73- mobileProvisionIdentifier,
74- codeSignIdentity
75- } ;
76-
77- const platformData = this . $platformsData . getPlatformData ( platform , this . $projectData ) ;
78-
79- if ( mobileProvisionIdentifier || codeSignIdentity ) {
80- this . $logger . info ( "Building .ipa with the selected mobile provision and/or certificate." ) ;
81- // This is not very correct as if we build multiple targets we will try to sign all of them using the signing identity here.
82- await this . $platformService . preparePlatform ( platformData , this . $projectData , preparePlatformData ) ;
83- await this . $platformBuildService . buildPlatform ( platformData , this . $projectData , buildConfig ) ;
84- ipaFilePath = this . $platformService . lastOutputPath ( platform , buildConfig , this . $projectData ) ;
85- } else {
86- this . $logger . info ( "No .ipa, mobile provision or certificate set. Perfect! Now we'll build .xcarchive and let Xcode pick the distribution certificate and provisioning profile for you when exporting .ipa for AppStore submission." ) ;
87- await this . $platformService . preparePlatform ( platformData , this . $projectData , preparePlatformData ) ;
88-
89- ipaFilePath = await this . $xcodebuildService . buildForAppStore ( platformData , this . $projectData , buildConfig ) ;
90- this . $logger . info ( `Export at: ${ ipaFilePath } ` ) ;
91- }
61+ // const platformWorkflowData = {
62+ // release: this.$options.release,
63+ // useHotModuleReload: false,
64+ // env: this.$options.env,
65+ // platformParam: platform,
66+ // signingOptions: {
67+ // teamId: this.$options.teamId,
68+ // provision: this.$options.provision
69+ // }
70+ // };
71+ // const buildConfig: IBuildConfig = {
72+ // projectDir: this.$options.path,
73+ // release: this.$options.release,
74+ // device: this.$options.device,
75+ // provision: this.$options.provision,
76+ // teamId: this.$options.teamId,
77+ // buildForDevice: true,
78+ // iCloudContainerEnvironment: this.$options.iCloudContainerEnvironment,
79+ // mobileProvisionIdentifier,
80+ // codeSignIdentity
81+ // };
82+
83+ // const platformData = this.$platformsData.getPlatformData(platform, this.$projectData);
84+
85+ // if (mobileProvisionIdentifier || codeSignIdentity) {
86+ // this.$logger.info("Building .ipa with the selected mobile provision and/or certificate.");
87+ // // This is not very correct as if we build multiple targets we will try to sign all of them using the signing identity here.
88+ // await this.$platformService.preparePlatform(platformData, this.$projectData, platformWorkflowData);
89+ // await this.$platformBuildService.buildPlatform(platformData, this.$projectData, buildConfig);
90+ // ipaFilePath = this.$platformService.lastOutputPath(platform, buildConfig, this.$projectData);
91+ // } else {
92+ // this.$logger.info("No .ipa, mobile provision or certificate set. Perfect! Now we'll build .xcarchive and let Xcode pick the distribution certificate and provisioning profile for you when exporting .ipa for AppStore submission.");
93+ // await this.$platformService.preparePlatform(platformData, this.$projectData, platformWorkflowData);
94+
95+ // ipaFilePath = await this.$xcodebuildService.buildForAppStore(platformData, this.$projectData, buildConfig);
96+ // this.$logger.info(`Export at: ${ipaFilePath}`);
97+ // }
9298 }
9399
94100 await this . $itmsTransporterService . upload ( {
0 commit comments