@@ -37,12 +37,13 @@ function createTestInjector(projectPath: string, projectName: string): IInjector
3737 } ) ;
3838 testInjector . register ( "projectHelper" , { } ) ;
3939 testInjector . register ( "staticConfig" , ConfigLib . StaticConfig ) ;
40+ testInjector . register ( "projectDataService" , { } ) ;
4041
4142 return testInjector ;
4243}
4344
4445describe ( "Cocoapods support" , ( ) => {
45- if ( require ( "os" ) . platform !== "darwin" ) {
46+ if ( require ( "os" ) . platform ( ) !== "darwin" ) {
4647 console . log ( "Skipping Cocoapods tests. They cannot work on windows" ) ;
4748 } else {
4849 it ( "adds plugin with Podfile" , ( ) => {
@@ -68,7 +69,7 @@ describe("Cocoapods support", () => {
6869 fs . createDirectory ( platformsFolderPath ) . wait ( ) ;
6970
7071 let iOSProjectService = testInjector . resolve ( "iOSProjectService" ) ;
71- iOSProjectService . prepareDynamicFrameworks = ( pluginPlatformsFolderPath : string , pluginData : IPluginData ) : IFuture < void > => {
72+ iOSProjectService . prepareFrameworks = ( pluginPlatformsFolderPath : string , pluginData : IPluginData ) : IFuture < void > => {
7273 return Future . fromResult ( ) ;
7374 } ;
7475
@@ -90,7 +91,8 @@ describe("Cocoapods support", () => {
9091 assert . isTrue ( fs . exists ( projectPodfilePath ) . wait ( ) ) ;
9192
9293 let actualProjectPodfileContent = fs . readText ( projectPodfilePath ) . wait ( ) ;
93- let expectedProjectPodfileContent = [ `# Begin Podfile - ${ pluginPodfilePath } ` ,
94+ let expectedProjectPodfileContent = [ "use_frameworks!" ,
95+ `# Begin Podfile - ${ pluginPodfilePath } ` ,
9496 ` ${ pluginPodfileContent } ` ,
9597 " # End Podfile \n" ]
9698 . join ( "\n" ) ;
@@ -119,10 +121,10 @@ describe("Cocoapods support", () => {
119121 fs . createDirectory ( platformsFolderPath ) . wait ( ) ;
120122
121123 let iOSProjectService = testInjector . resolve ( "iOSProjectService" ) ;
122- iOSProjectService . prepareDynamicFrameworks = ( pluginPlatformsFolderPath : string , pluginData : IPluginData ) : IFuture < void > => {
124+ iOSProjectService . prepareFrameworks = ( pluginPlatformsFolderPath : string , pluginData : IPluginData ) : IFuture < void > => {
123125 return Future . fromResult ( ) ;
124126 } ;
125- iOSProjectService . removeDynamicFrameworks = ( pluginPlatformsFolderPath : string , pluginData : IPluginData ) : IFuture < void > => {
127+ iOSProjectService . removeFrameworks = ( pluginPlatformsFolderPath : string , pluginData : IPluginData ) : IFuture < void > => {
126128 return Future . fromResult ( ) ;
127129 } ;
128130
@@ -144,7 +146,8 @@ describe("Cocoapods support", () => {
144146 assert . isTrue ( fs . exists ( projectPodfilePath ) . wait ( ) ) ;
145147
146148 let actualProjectPodfileContent = fs . readText ( projectPodfilePath ) . wait ( ) ;
147- let expectedProjectPodfileContent = [ `# Begin Podfile - ${ pluginPodfilePath } ` ,
149+ let expectedProjectPodfileContent = [ "use_frameworks!" ,
150+ `# Begin Podfile - ${ pluginPodfilePath } ` ,
148151 ` ${ pluginPodfileContent } ` ,
149152 " # End Podfile \n" ]
150153 . join ( "\n" ) ;
0 commit comments