@@ -37,12 +37,13 @@ function createTestInjector(projectPath: string, projectName: string): IInjector
37
37
} ) ;
38
38
testInjector . register ( "projectHelper" , { } ) ;
39
39
testInjector . register ( "staticConfig" , ConfigLib . StaticConfig ) ;
40
+ testInjector . register ( "projectDataService" , { } ) ;
40
41
41
42
return testInjector ;
42
43
}
43
44
44
45
describe ( "Cocoapods support" , ( ) => {
45
- if ( require ( "os" ) . platform !== "darwin" ) {
46
+ if ( require ( "os" ) . platform ( ) !== "darwin" ) {
46
47
console . log ( "Skipping Cocoapods tests. They cannot work on windows" ) ;
47
48
} else {
48
49
it ( "adds plugin with Podfile" , ( ) => {
@@ -68,7 +69,7 @@ describe("Cocoapods support", () => {
68
69
fs . createDirectory ( platformsFolderPath ) . wait ( ) ;
69
70
70
71
let iOSProjectService = testInjector . resolve ( "iOSProjectService" ) ;
71
- iOSProjectService . prepareDynamicFrameworks = ( pluginPlatformsFolderPath : string , pluginData : IPluginData ) : IFuture < void > => {
72
+ iOSProjectService . prepareFrameworks = ( pluginPlatformsFolderPath : string , pluginData : IPluginData ) : IFuture < void > => {
72
73
return Future . fromResult ( ) ;
73
74
} ;
74
75
@@ -90,7 +91,8 @@ describe("Cocoapods support", () => {
90
91
assert . isTrue ( fs . exists ( projectPodfilePath ) . wait ( ) ) ;
91
92
92
93
let actualProjectPodfileContent = fs . readText ( projectPodfilePath ) . wait ( ) ;
93
- let expectedProjectPodfileContent = [ `# Begin Podfile - ${ pluginPodfilePath } ` ,
94
+ let expectedProjectPodfileContent = [ "use_frameworks!" ,
95
+ `# Begin Podfile - ${ pluginPodfilePath } ` ,
94
96
` ${ pluginPodfileContent } ` ,
95
97
" # End Podfile \n" ]
96
98
. join ( "\n" ) ;
@@ -119,10 +121,10 @@ describe("Cocoapods support", () => {
119
121
fs . createDirectory ( platformsFolderPath ) . wait ( ) ;
120
122
121
123
let iOSProjectService = testInjector . resolve ( "iOSProjectService" ) ;
122
- iOSProjectService . prepareDynamicFrameworks = ( pluginPlatformsFolderPath : string , pluginData : IPluginData ) : IFuture < void > => {
124
+ iOSProjectService . prepareFrameworks = ( pluginPlatformsFolderPath : string , pluginData : IPluginData ) : IFuture < void > => {
123
125
return Future . fromResult ( ) ;
124
126
} ;
125
- iOSProjectService . removeDynamicFrameworks = ( pluginPlatformsFolderPath : string , pluginData : IPluginData ) : IFuture < void > => {
127
+ iOSProjectService . removeFrameworks = ( pluginPlatformsFolderPath : string , pluginData : IPluginData ) : IFuture < void > => {
126
128
return Future . fromResult ( ) ;
127
129
} ;
128
130
@@ -144,7 +146,8 @@ describe("Cocoapods support", () => {
144
146
assert . isTrue ( fs . exists ( projectPodfilePath ) . wait ( ) ) ;
145
147
146
148
let actualProjectPodfileContent = fs . readText ( projectPodfilePath ) . wait ( ) ;
147
- let expectedProjectPodfileContent = [ `# Begin Podfile - ${ pluginPodfilePath } ` ,
149
+ let expectedProjectPodfileContent = [ "use_frameworks!" ,
150
+ `# Begin Podfile - ${ pluginPodfilePath } ` ,
148
151
` ${ pluginPodfileContent } ` ,
149
152
" # End Podfile \n" ]
150
153
. join ( "\n" ) ;
0 commit comments