@@ -188,7 +188,7 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
188
188
shell . cp ( "-R" , libraryPath , fullTargetPath ) ;
189
189
190
190
let project = this . createPbxProj ( ) ;
191
- let frameworkPath = path . relative ( "platforms/ios" , path . join ( targetPath , frameworkName + ".framework" ) ) ;
191
+ let frameworkPath = this . getFrameworkRelativePath ( libraryPath ) ;
192
192
project . addFramework ( frameworkPath , { customFramework : true , embed : true } ) ;
193
193
project . updateBuildProperty ( "IPHONEOS_DEPLOYMENT_TARGET" , "8.0" ) ;
194
194
this . savePbxProj ( project ) . wait ( ) ;
@@ -271,6 +271,13 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
271
271
return name . replace ( / \\ \" / g, "\"" ) ;
272
272
}
273
273
274
+ private getFrameworkRelativePath ( libraryPath : string ) : string {
275
+ let frameworkName = path . basename ( libraryPath , path . extname ( libraryPath ) ) ;
276
+ let targetPath = path . join ( "lib" , this . platformData . normalizedPlatformName , frameworkName ) ;
277
+ let frameworkPath = path . relative ( "platforms/ios" , path . join ( targetPath , frameworkName + ".framework" ) ) ;
278
+ return frameworkPath ;
279
+ }
280
+
274
281
private get pbxProjPath ( ) : string {
275
282
return path . join ( this . platformData . projectRoot , this . $projectData . projectName + ".xcodeproj" , "project.pbxproj" ) ;
276
283
}
@@ -298,7 +305,11 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
298
305
let pluginPlatformsFolderPath = pluginData . pluginPlatformsFolderPath ( IOSProjectService . IOS_PLATFORM_NAME ) ;
299
306
let project = this . createPbxProj ( ) ;
300
307
301
- _ . each ( this . getAllDynamicFrameworksForPlugin ( pluginData ) . wait ( ) , fileName => project . removeFramework ( path . join ( pluginPlatformsFolderPath , fileName + ".framework" ) , { customFramework : true , embed : true } ) ) ;
308
+ _ . each ( this . getAllDynamicFrameworksForPlugin ( pluginData ) . wait ( ) , fileName => {
309
+ let fullFrameworkPath = path . join ( pluginPlatformsFolderPath , fileName ) ;
310
+ let relativeFrameworkPath = this . getFrameworkRelativePath ( fullFrameworkPath ) ;
311
+ project . removeFramework ( relativeFrameworkPath , { customFramework : true , embed : true } )
312
+ } ) ;
302
313
303
314
this . savePbxProj ( project ) . wait ( ) ;
304
315
} ) . future < void > ( ) ( ) ;
0 commit comments