When an update is released for the OneSignal plugin it is often necessary to update the cocoapods spec repos. This can be accomplished with simple cordova hook scripts. Create the following scripts in the root of your project repo. Be sure to set execute permissions on both scripts using chmod or git.
pod repo update
Ionic Git users:
pod install --project-directory='/Users/ionic/builds/project-1/platforms/ios/'
Github Integration users:
pod install --project-directory='/Users/ionic/builds/<github user>/<repo name>/ios/'
Where <github user> is the username for your github account and <repo name> is the title of the repo. You can find this in the URL of your repo. For example:
would use the following path in the script:
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 command 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.