Skip to content

Commit ccfce12

Browse files
Merge pull request #3935 from NativeScript/fix-postinstall-script
Having two plugins with Podfiles and a postinstall script fails with tns 5.x
2 parents b1a8f90 + 1acc45e commit ccfce12

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/services/cocoapods-service.ts

+3
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,9 @@ export class CocoaPodsService implements ICocoaPodsService {
8989
if (index !== -1) {
9090
finalPodfileContent = finalPodfileContent.replace(postInstallHookStart, `${postInstallHookStart}${postInstallHookContent}`);
9191
} else {
92+
if (finalPodfileContent.length > 0) {
93+
finalPodfileContent += `${EOL}${EOL}`;
94+
}
9295
const postInstallHook = `${postInstallHookStart}${postInstallHookContent}end`;
9396
finalPodfileContent = `${finalPodfileContent}${postInstallHook}`;
9497
}

0 commit comments

Comments
 (0)