@@ -176,10 +176,11 @@ export class IOSProjectService extends projectServiceBaseLib.PlatformProjectServ
176
176
* Archive the Xcode project to .xcarchive.
177
177
* Returns the path to the .xcarchive.
178
178
*/
179
- public async archive ( projectData : IProjectData , options ?: { archivePath ?: string } ) : Promise < string > {
179
+ public async archive ( projectData : IProjectData , buildConfig ?: IBuildConfig , options ?: { archivePath ?: string } ) : Promise < string > {
180
180
let projectRoot = this . getPlatformData ( projectData ) . projectRoot ;
181
181
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" ]
183
184
. concat ( this . xcbuildProjectArgs ( projectRoot , projectData , "scheme" ) ) ;
184
185
await this . $childProcess . spawnFromEvent ( "xcodebuild" , args , "exit" , { stdio : 'inherit' } ) ;
185
186
return archivePath ;
@@ -456,7 +457,7 @@ export class IOSProjectService extends projectServiceBaseLib.PlatformProjectServ
456
457
}
457
458
458
459
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 ) ;
460
461
let exportFileIpa = await this . exportDevelopmentArchive ( projectData ,
461
462
buildConfig ,
462
463
{
0 commit comments