Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Invalid Podfile file specifying multiple post_install hooks is unsupported

Tags:

ios

cocoapods

I'm using cocoapods 1.1.1 and in my podfile I have more than one post_install hooks. And I'm getting this error :

[!] Invalid `Podfile` file: [!] Specifying multiple `post_install` hooks is unsupported..
-------------------------------------------
 #
 >  post_install do |installer|
 #      installer.pods_project.targets.each do |target|

Did anyone face the same problem before? And Yes! I have 1 post_install in my 1 target and another in global scope. I could move in one, but why?

like image 937
mgyky Avatar asked Dec 03 '22 14:12

mgyky


1 Answers

Solution 2022

When I removed my code from my main target and moved in global scope's post_install block it's works like charm.

For some reason if you add multiple post_install (global and 1 target for instance) move them in same global block and add if-else statements for managing targets.

like image 168
mgyky Avatar answered Dec 23 '22 18:12

mgyky