@@ -490,6 +490,7 @@ export class IOSProjectService extends projectServiceBaseLib.PlatformProjectServ
490
490
}
491
491
492
492
xcode . setAutomaticSigningStyle ( projectData . projectName , teamId ) ;
493
+ xcode . setAutomaticSigningStyleByTargetProductType ( "com.apple.product-type.app-extension" , teamId ) ;
493
494
xcode . save ( ) ;
494
495
495
496
this . $logger . trace ( `Set Automatic signing style and team id ${ teamId } .` ) ;
@@ -524,13 +525,14 @@ export class IOSProjectService extends projectServiceBaseLib.PlatformProjectServ
524
525
if ( ! mobileprovision ) {
525
526
this . $errors . failWithoutHelp ( "Failed to find mobile provision with UUID or Name: " + provision ) ;
526
527
}
527
-
528
- xcode . setManualSigningStyle ( projectData . projectName , {
528
+ const configuration = {
529
529
team : mobileprovision . TeamIdentifier && mobileprovision . TeamIdentifier . length > 0 ? mobileprovision . TeamIdentifier [ 0 ] : undefined ,
530
530
uuid : mobileprovision . UUID ,
531
531
name : mobileprovision . Name ,
532
532
identity : mobileprovision . Type === "Development" ? "iPhone Developer" : "iPhone Distribution"
533
- } ) ;
533
+ }
534
+ xcode . setManualSigningStyle ( projectData . projectName , configuration ) ;
535
+ xcode . setManualSigningStyleByTargetProductType ( "com.apple.product-type.app-extension" , configuration ) ;
534
536
xcode . save ( ) ;
535
537
536
538
// this.cache(uuid);
@@ -1107,6 +1109,7 @@ We will now place an empty obsolete compatability white screen LauncScreen.xib f
1107
1109
}
1108
1110
1109
1111
private async prepareExtensionsCode ( extensionsFolderPath : string , projectData : IProjectData ) : Promise < void > {
1112
+ const targetUuids : string [ ] = [ ] ;
1110
1113
if ( ! this . $fs . exists ( extensionsFolderPath ) ) {
1111
1114
return ;
1112
1115
}
@@ -1159,9 +1162,27 @@ We will now place an empty obsolete compatability white screen LauncScreen.xib f
1159
1162
project . addPbxGroup ( group . files , group . name , group . path , null , { isMain : true , target : target . uuid , filesRelativeToProject : true } ) ;
1160
1163
project . addBuildProperty ( "PRODUCT_BUNDLE_IDENTIFIER" , `${ projectData . projectIdentifiers . ios } .${ extensionFolder } ` , "Debug" , extensionFolder ) ;
1161
1164
project . addBuildProperty ( "PRODUCT_BUNDLE_IDENTIFIER" , `${ projectData . projectIdentifiers . ios } .${ extensionFolder } ` , "Release" , extensionFolder ) ;
1165
+ targetUuids . push ( target . uuid ) ;
1162
1166
} ) ;
1163
1167
1164
1168
this . savePbxProj ( project , projectData , true ) ;
1169
+
1170
+ const xcode = this . $pbxprojDomXcode . Xcode . open ( this . getPbxProjPath ( projectData ) ) ;
1171
+ const signing = xcode . getSigning ( projectData . projectName ) ;
1172
+ if ( signing !== undefined ) {
1173
+ _ . forEach ( targetUuids , targetUuid => {
1174
+ if ( signing . style === "Automatic" ) {
1175
+ xcode . setAutomaticSigningStyleByTargetKey ( targetUuid , signing . team ) ;
1176
+ } else {
1177
+ for ( let config in signing . configurations ) {
1178
+ const signingConfiguration = signing . configurations [ config ] ;
1179
+ xcode . setManualSigningStyleByTargetKey ( targetUuid , signingConfiguration ) ;
1180
+ break ;
1181
+ }
1182
+ }
1183
+ } )
1184
+ }
1185
+ xcode . save ( ) ;
1165
1186
}
1166
1187
1167
1188
private getRootGroup ( name : string , rootPath : string ) {
0 commit comments