@@ -1178,17 +1178,19 @@ describe("Merge Project XCConfig files", () => {
11781178
11791179 // run merge for all release: debug|release
11801180 for ( const release in [ true , false ] ) {
1181- await ( < any > iOSProjectService ) . mergeProjectXcconfigFiles ( projectData , { release } ) ;
1181+ await ( < any > iOSProjectService ) . mergeProjectXcconfigFiles ( projectData ) ;
11821182
1183- const destinationFilePath = xcconfigService . getPluginsXcconfigFilePath ( projectRoot , { release : ! ! release } ) ;
1183+ const destinationFilePaths = xcconfigService . getPluginsXcconfigFilePaths ( projectRoot ) ;
11841184
1185- assert . isTrue ( fs . exists ( destinationFilePath ) , 'Target build xcconfig is missing for release: ' + release ) ;
1186- const expected = {
1187- 'ASSETCATALOG_COMPILER_APPICON_NAME' : 'AppIcon' ,
1188- 'ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME' : 'LaunchImage' ,
1189- 'CODE_SIGN_IDENTITY' : 'iPhone Distribution'
1190- } ;
1191- assertPropertyValues ( expected , destinationFilePath , testInjector ) ;
1185+ _ . each ( destinationFilePaths , destinationFilePath => {
1186+ assert . isTrue ( fs . exists ( destinationFilePath ) , 'Target build xcconfig is missing for release: ' + release ) ;
1187+ const expected = {
1188+ 'ASSETCATALOG_COMPILER_APPICON_NAME' : 'AppIcon' ,
1189+ 'ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME' : 'LaunchImage' ,
1190+ 'CODE_SIGN_IDENTITY' : 'iPhone Distribution'
1191+ } ;
1192+ assertPropertyValues ( expected , destinationFilePath , testInjector ) ;
1193+ } ) ;
11921194 }
11931195 } ) ;
11941196
@@ -1206,13 +1208,15 @@ describe("Merge Project XCConfig files", () => {
12061208
12071209 await ( < any > iOSProjectService ) . mergeProjectXcconfigFiles ( projectData , { release } ) ;
12081210
1209- const destinationFilePath = xcconfigService . getPluginsXcconfigFilePath ( projectRoot , { release : ! ! release } ) ;
1211+ const destinationFilePaths = xcconfigService . getPluginsXcconfigFilePaths ( projectRoot ) ;
12101212
1211- assert . isTrue ( fs . exists ( destinationFilePath ) , 'Target build xcconfig is missing for release: ' + release ) ;
1212- const expected = {
1213- 'CODE_SIGN_ENTITLEMENTS' : iOSEntitlementsService . getPlatformsEntitlementsRelativePath ( projectData )
1214- } ;
1215- assertPropertyValues ( expected , destinationFilePath , testInjector ) ;
1213+ _ . each ( destinationFilePaths , destinationFilePath => {
1214+ assert . isTrue ( fs . exists ( destinationFilePath ) , 'Target build xcconfig is missing for release: ' + release ) ;
1215+ const expected = {
1216+ 'CODE_SIGN_ENTITLEMENTS' : iOSEntitlementsService . getPlatformsEntitlementsRelativePath ( projectData )
1217+ } ;
1218+ assertPropertyValues ( expected , destinationFilePath , testInjector ) ;
1219+ } ) ;
12161220 }
12171221 } ) ;
12181222
@@ -1222,34 +1226,32 @@ describe("Merge Project XCConfig files", () => {
12221226 const xcconfigEntitlements = appResourceXCConfigContent + `${ EOL } CODE_SIGN_ENTITLEMENTS = ${ expectedEntitlementsFile } ` ;
12231227 fs . writeFile ( appResourcesXcconfigPath , xcconfigEntitlements ) ;
12241228
1225- // run merge for all release: debug|release
1226- for ( const release in [ true , false ] ) {
1227- await ( < any > iOSProjectService ) . mergeProjectXcconfigFiles ( projectData , { release } ) ;
1229+ await ( < any > iOSProjectService ) . mergeProjectXcconfigFiles ( projectData ) ;
12281230
1229- const destinationFilePath = xcconfigService . getPluginsXcconfigFilePath ( projectRoot , { release : ! ! release } ) ;
1231+ const destinationFilePaths = xcconfigService . getPluginsXcconfigFilePaths ( projectRoot ) ;
12301232
1231- assert . isTrue ( fs . exists ( destinationFilePath ) , 'Target build xcconfig is missing for release: ' + release ) ;
1233+ _ . each ( destinationFilePaths , destinationFilePath => {
1234+ assert . isTrue ( fs . exists ( destinationFilePath ) , `Target build xcconfig ${ destinationFilePath } is missing.` ) ;
12321235 const expected = {
12331236 'ASSETCATALOG_COMPILER_APPICON_NAME' : 'AppIcon' ,
12341237 'ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME' : 'LaunchImage' ,
12351238 'CODE_SIGN_IDENTITY' : 'iPhone Distribution' ,
12361239 'CODE_SIGN_ENTITLEMENTS' : expectedEntitlementsFile
12371240 } ;
12381241 assertPropertyValues ( expected , destinationFilePath , testInjector ) ;
1239- }
1242+ } ) ;
12401243 } ) ;
12411244
12421245 it ( "creates empty plugins-<config>.xcconfig in case there are no build.xcconfig in App_Resources and in plugins" , async ( ) => {
1243- // run merge for all release: debug|release
1244- for ( const release in [ true , false ] ) {
1245- await ( < any > iOSProjectService ) . mergeProjectXcconfigFiles ( projectData , { release } ) ;
1246+ await ( < any > iOSProjectService ) . mergeProjectXcconfigFiles ( projectData ) ;
12461247
1247- const destinationFilePath = xcconfigService . getPluginsXcconfigFilePath ( projectRoot , { release : ! ! release } ) ;
1248+ const destinationFilePaths = xcconfigService . getPluginsXcconfigFilePaths ( projectRoot ) ;
12481249
1249- assert . isTrue ( fs . exists ( destinationFilePath ) , 'Target build xcconfig is missing for release: ' + release ) ;
1250+ _ . each ( destinationFilePaths , destinationFilePath => {
1251+ assert . isTrue ( fs . exists ( destinationFilePath ) , `Target build xcconfig ${ destinationFilePath } is missing.` ) ;
12501252 const content = fs . readFile ( destinationFilePath ) . toString ( ) ;
12511253 assert . equal ( content , "" ) ;
1252- }
1254+ } ) ;
12531255 } ) ;
12541256} ) ;
12551257
0 commit comments