@@ -940,6 +940,7 @@ We will now place an empty obsolete compatability white screen LauncScreen.xib f
940
940
await this . prepareNativeSourceCode ( pluginData . name , sourcePath , projectData ) ;
941
941
}
942
942
943
+ await this . prepareResources ( pluginPlatformsFolderPath , pluginData , projectData ) ;
943
944
await this . prepareFrameworks ( pluginPlatformsFolderPath , pluginData , projectData ) ;
944
945
await this . prepareStaticLibs ( pluginPlatformsFolderPath , pluginData , projectData ) ;
945
946
await this . prepareCocoapods ( pluginPlatformsFolderPath , projectData ) ;
@@ -1120,7 +1121,6 @@ We will now place an empty obsolete compatability white screen LauncScreen.xib f
1120
1121
}
1121
1122
1122
1123
private async prepareNativeSourceCode ( pluginName : string , pluginPlatformsFolderPath : string , projectData : IProjectData ) : Promise < void > {
1123
-
1124
1124
const project = this . createPbxProj ( projectData ) ;
1125
1125
const group = this . getRootGroup ( pluginName , pluginPlatformsFolderPath ) ;
1126
1126
project . addPbxGroup ( group . files . map ( f => f . path ) , group . name , group . path , null , { isMain :true } ) ;
@@ -1143,6 +1143,18 @@ We will now place an empty obsolete compatability white screen LauncScreen.xib f
1143
1143
return rootGroup ;
1144
1144
}
1145
1145
1146
+ private async prepareResources ( pluginPlatformsFolderPath : string , pluginData : IPluginData , projectData : IProjectData ) : Promise < void > {
1147
+ const project = this . createPbxProj ( projectData ) ;
1148
+ const resourcesPath = path . join ( pluginPlatformsFolderPath , "Resources" ) ;
1149
+ if ( this . $fs . exists ( resourcesPath ) && ! this . $fs . isEmptyDir ( resourcesPath ) ) {
1150
+ for ( const fileName of this . $fs . readDirectory ( resourcesPath ) ) {
1151
+ const filePath = path . join ( resourcesPath , fileName ) ;
1152
+
1153
+ project . addResourceFile ( filePath ) ;
1154
+ }
1155
+ }
1156
+ this . savePbxProj ( project , projectData ) ;
1157
+ }
1146
1158
private async prepareFrameworks ( pluginPlatformsFolderPath : string , pluginData : IPluginData , projectData : IProjectData ) : Promise < void > {
1147
1159
for ( const fileName of this . getAllLibsForPluginWithFileExtension ( pluginData , ".framework" ) ) {
1148
1160
await this . addFramework ( path . join ( pluginPlatformsFolderPath , fileName ) , projectData ) ;
0 commit comments