Create the following scripts in the root of your project repo and see the requirement below.
Step 1: Create the scripts
pod repo update
pod install --project-directory='./platforms/ios/'
Step 2: Reference the scripts in the ios platform element of config.xml:
<hook src="update_pods.sh" type="before_platform_add" />
<hook src="run_pods.sh" type="after_platform_add" />
These commands will run just before and after adding the ios platform. The first updates the pod repos and the second verifies that all pods are installed after the platform is added.
Step 3 (REQUIRED): After you've created the scripts and referenced them as above, to avoid seeing a
spawn EACCES error, you must also set execute permissions on both scripts using chmod or git. You can see an example using git in this article.