@@ -188,7 +188,7 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
188188 shell . cp ( "-R" , libraryPath , fullTargetPath ) ;
189189
190190 let project = this . createPbxProj ( ) ;
191- let frameworkPath = path . relative ( "platforms/ios" , path . join ( targetPath , frameworkName + ".framework" ) ) ;
191+ let frameworkPath = this . getFrameworkRelativePath ( libraryPath ) ;
192192 project . addFramework ( frameworkPath , { customFramework : true , embed : true } ) ;
193193 project . updateBuildProperty ( "IPHONEOS_DEPLOYMENT_TARGET" , "8.0" ) ;
194194 this . savePbxProj ( project ) . wait ( ) ;
@@ -271,6 +271,13 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
271271 return name . replace ( / \\ \" / g, "\"" ) ;
272272 }
273273
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+
274281 private get pbxProjPath ( ) : string {
275282 return path . join ( this . platformData . projectRoot , this . $projectData . projectName + ".xcodeproj" , "project.pbxproj" ) ;
276283 }
@@ -298,7 +305,11 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
298305 let pluginPlatformsFolderPath = pluginData . pluginPlatformsFolderPath ( IOSProjectService . IOS_PLATFORM_NAME ) ;
299306 let project = this . createPbxProj ( ) ;
300307
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+ } ) ;
302313
303314 this . savePbxProj ( project ) . wait ( ) ;
304315 } ) . future < void > ( ) ( ) ;
0 commit comments