@@ -176,10 +176,11 @@ export class IOSProjectService extends projectServiceBaseLib.PlatformProjectServ
176176 * Archive the Xcode project to .xcarchive.
177177 * Returns the path to the .xcarchive.
178178 */
179- public async archive ( projectData : IProjectData , options ?: { archivePath ?: string } ) : Promise < string > {
179+ public async archive ( projectData : IProjectData , buildConfig ?: IBuildConfig , options ?: { archivePath ?: string } ) : Promise < string > {
180180 let projectRoot = this . getPlatformData ( projectData ) . projectRoot ;
181181 let archivePath = options && options . archivePath ? path . resolve ( options . archivePath ) : path . join ( projectRoot , "/build/archive/" , projectData . projectName + ".xcarchive" ) ;
182- let args = [ "archive" , "-archivePath" , archivePath ]
182+ let args = [ "archive" , "-archivePath" , archivePath , "-configuration" ,
183+ ( ! buildConfig || buildConfig . release ) ? "Release" : "Debug" ]
183184 . concat ( this . xcbuildProjectArgs ( projectRoot , projectData , "scheme" ) ) ;
184185 await this . $childProcess . spawnFromEvent ( "xcodebuild" , args , "exit" , { stdio : 'inherit' } ) ;
185186 return archivePath ;
@@ -456,7 +457,7 @@ export class IOSProjectService extends projectServiceBaseLib.PlatformProjectServ
456457 }
457458
458459 private async createIpa ( projectRoot : string , projectData : IProjectData , buildConfig : IBuildConfig ) : Promise < string > {
459- let xarchivePath = await this . archive ( projectData ) ;
460+ let xarchivePath = await this . archive ( projectData , buildConfig ) ;
460461 let exportFileIpa = await this . exportDevelopmentArchive ( projectData ,
461462 buildConfig ,
462463 {
0 commit comments