@@ -157,35 +157,21 @@ class RNIOS extends Platform.IOS implements RNPlatform {
157
157
const iOSProject : string = path . join ( projectDirectory , TestConfig . TestAppName , "ios" ) ;
158
158
const infoPlistPath : string = path . join ( iOSProject , TestConfig . TestAppName , "Info.plist" ) ;
159
159
const appDelegatePath : string = path . join ( iOSProject , TestConfig . TestAppName , "AppDelegate.m" ) ;
160
- // Create and install the Podfile
161
- return TestUtil . getProcessOutput ( "pod init" , { cwd : iOSProject } )
162
- . then ( ( ) => {
163
- return fs . writeFileSync ( path . join ( iOSProject , "Podfile" ) ,
164
- "target '" + TestConfig . TestAppName + "'\n pod 'React', :path => '../node_modules/react-native', :subspecs => [ 'Core', 'RCTImage', 'RCTNetwork', 'RCTText', 'RCTWebSocket', ]\n pod 'CodePush', :path => '../node_modules/react-native-code-push'\n" ) ;
165
- } )
160
+
161
+ // Install the Podfile
162
+ return TestUtil . getProcessOutput ( "pod install" , { cwd : iOSProject } )
166
163
// Put the IOS deployment key in the Info.plist
167
164
. then ( TestUtil . replaceString . bind ( undefined , infoPlistPath ,
168
165
"</dict>\n</plist>" ,
169
166
"<key>CodePushDeploymentKey</key>\n\t<string>" + this . getDefaultDeploymentKey ( ) + "</string>\n\t<key>CodePushServerURL</key>\n\t<string>" + this . getServerUrl ( ) + "</string>\n\t</dict>\n</plist>" ) )
170
- // Add the correct linker flags to the project.pbxproj
171
- . then ( TestUtil . replaceString . bind ( undefined , path . join ( iOSProject , TestConfig . TestAppName + ".xcodeproj" , "project.pbxproj" ) ,
172
- "\"-lc[+][+]\"," , "\"-lc++\", \"$(inherited)\"" ) )
173
- // Install the Pod
174
- . then ( TestUtil . getProcessOutput . bind ( undefined , "pod install" , { cwd : iOSProject } ) )
175
- // Add the correct bundle identifier to the Info.plist
176
- . then ( TestUtil . replaceString . bind ( undefined , infoPlistPath ,
177
- "org[.]reactjs[.]native[.]example[.][$][(]PRODUCT_NAME:rfc1034identifier[)]" ,
178
- TestConfig . TestNamespace ) )
179
167
// Set the app version to 1.0.0 instead of 1.0 in the Info.plist
180
168
. then ( TestUtil . replaceString . bind ( undefined , infoPlistPath , "1.0" , "1.0.0" ) )
181
169
// Fix the linker flag list in project.pbxproj (pod install adds an extra comma)
182
170
. then ( TestUtil . replaceString . bind ( undefined , path . join ( iOSProject , TestConfig . TestAppName + ".xcodeproj" , "project.pbxproj" ) ,
183
171
"\"[$][(]inherited[)]\",\\s*[)];" , "\"$(inherited)\"\n\t\t\t\t);" ) )
184
- // Prevent the packager from starting during builds by replacing the script that starts it with nothing.
185
- . then ( TestUtil . replaceString . bind ( undefined ,
186
- path . join ( projectDirectory , TestConfig . TestAppName , "node_modules" , "react-native" , "React" , "React.xcodeproj" , "project.pbxproj" ) ,
187
- "shellScript = \".*\";" ,
188
- "shellScript = \"\";" ) )
172
+ // Add the correct bundle identifier
173
+ . then ( TestUtil . replaceString . bind ( undefined , path . join ( iOSProject , TestConfig . TestAppName + ".xcodeproj" , "project.pbxproj" ) ,
174
+ "PRODUCT_BUNDLE_IDENTIFIER = [^;]*" , "PRODUCT_BUNDLE_IDENTIFIER = \"" + TestConfig . TestNamespace + "\"" ) )
189
175
// Copy the AppDelegate.m to the project
190
176
. then ( TestUtil . copyFile . bind ( undefined ,
191
177
path . join ( TestConfig . templatePath , "ios" , TestConfig . TestAppName , "AppDelegate.m" ) ,
0 commit comments