@@ -1178,17 +1178,19 @@ describe("Merge Project XCConfig files", () => {
1178
1178
1179
1179
// run merge for all release: debug|release
1180
1180
for ( const release in [ true , false ] ) {
1181
- await ( < any > iOSProjectService ) . mergeProjectXcconfigFiles ( projectData , { release } ) ;
1181
+ await ( < any > iOSProjectService ) . mergeProjectXcconfigFiles ( projectData ) ;
1182
1182
1183
- const destinationFilePath = xcconfigService . getPluginsXcconfigFilePath ( projectRoot , { release : ! ! release } ) ;
1183
+ const destinationFilePaths = xcconfigService . getPluginsXcconfigFilePaths ( projectRoot ) ;
1184
1184
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
+ } ) ;
1192
1194
}
1193
1195
} ) ;
1194
1196
@@ -1206,13 +1208,15 @@ describe("Merge Project XCConfig files", () => {
1206
1208
1207
1209
await ( < any > iOSProjectService ) . mergeProjectXcconfigFiles ( projectData , { release } ) ;
1208
1210
1209
- const destinationFilePath = xcconfigService . getPluginsXcconfigFilePath ( projectRoot , { release : ! ! release } ) ;
1211
+ const destinationFilePaths = xcconfigService . getPluginsXcconfigFilePaths ( projectRoot ) ;
1210
1212
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
+ } ) ;
1216
1220
}
1217
1221
} ) ;
1218
1222
@@ -1222,34 +1226,32 @@ describe("Merge Project XCConfig files", () => {
1222
1226
const xcconfigEntitlements = appResourceXCConfigContent + `${ EOL } CODE_SIGN_ENTITLEMENTS = ${ expectedEntitlementsFile } ` ;
1223
1227
fs . writeFile ( appResourcesXcconfigPath , xcconfigEntitlements ) ;
1224
1228
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 ) ;
1228
1230
1229
- const destinationFilePath = xcconfigService . getPluginsXcconfigFilePath ( projectRoot , { release : ! ! release } ) ;
1231
+ const destinationFilePaths = xcconfigService . getPluginsXcconfigFilePaths ( projectRoot ) ;
1230
1232
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.` ) ;
1232
1235
const expected = {
1233
1236
'ASSETCATALOG_COMPILER_APPICON_NAME' : 'AppIcon' ,
1234
1237
'ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME' : 'LaunchImage' ,
1235
1238
'CODE_SIGN_IDENTITY' : 'iPhone Distribution' ,
1236
1239
'CODE_SIGN_ENTITLEMENTS' : expectedEntitlementsFile
1237
1240
} ;
1238
1241
assertPropertyValues ( expected , destinationFilePath , testInjector ) ;
1239
- }
1242
+ } ) ;
1240
1243
} ) ;
1241
1244
1242
1245
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 ) ;
1246
1247
1247
- const destinationFilePath = xcconfigService . getPluginsXcconfigFilePath ( projectRoot , { release : ! ! release } ) ;
1248
+ const destinationFilePaths = xcconfigService . getPluginsXcconfigFilePaths ( projectRoot ) ;
1248
1249
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.` ) ;
1250
1252
const content = fs . readFile ( destinationFilePath ) . toString ( ) ;
1251
1253
assert . equal ( content , "" ) ;
1252
- }
1254
+ } ) ;
1253
1255
} ) ;
1254
1256
} ) ;
1255
1257
0 commit comments