Failed to install 'wonderpush-cordova-sdk


I try to use WonderPush on an Ionic 3 project.
When I enter the install command cordova plugin add wonderpush-cordova-sdk --variable CLIENT_ID=XXX --variable CLIENT_SECRET=YYY --variable SENDER_ID=ZZZ I get this alert in VS Code :
Plugin “wonderpush-cordova-sdk” already installed on android.
Plugin “wonderpush-cordova-sdk” already installed on browser.
Installing “wonderpush-cordova-sdk” for ios
Failed to install ‘wonderpush-cordova-sdk’: undefined
CordovaError: Promise rejected with non-error: ‘/usr/local/bin/pod: /usr/local/Cellar/cocoapods/1.7.5/libexec/bin/pod: /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby: bad interpreter: No such file or directory\n/usr/local/bin/pod: line 2: /usr/local/Cellar/cocoapods/1.7.5/libexec/bin/pod: Undefined error: 0\n’
at cli.catch.err (/usr/local/lib/node_modules/cordova/bin/cordova:29:15)
at process._tickCallback (internal/process/next_tick.js:68:7)

Can someone help me please ?

Hi Stéphane,

It looks like your Cocoapods installation is broken.
Make sure that when you run pod install Cocoapods runs fine.

If not, I suggest you try the following command:

sudo gem install cocoapods

or update cocoapods using:

sudo gem update cocoapods


Thanks a lot Olivier for your answer. It seems to work but I have another problem, now…
When I open my project in xCode and try to generate an archive, I get this error :
‘WonderPushExtension/WonderPushExtension.h’ file not found

… in Project>WonderPushNotificationServiceExtension>NotificationService.h

Here is the content of this file :
#import <WonderPushExtension/WonderPushExtension.h>
@interface NotificationService : WPNotificationServiceExtension

Thanks for your help.

Hi Stéphane,

I suggest you remove the platform/ios/ folder and run cordova prepare ios to recreate it from scratch.
Tell me how this goes.


Hi Olivier,

I ran those commands :
cordova platform remove ios
cordova platform add ios
cordova prepare ios
ionic cordova build --release ios

Without success. I still have in NotificationService.h file in Xcode (see the screenshot attached) and I can’t build for iOs…

Thanks for your help.

Hi Olivier,

Do you have any other suggestion to fixe my problem ?



Exactly same problem here.
‘WonderPushExtension/WonderPushExtension.h’ file not found

I already spent hours trying to add the proper path in my Xcode settings, but I’m really unable to make it work…

How to reproduce? Nothing easier, just create a blank project with cordova, add the plugin, add the ios platform, open xcode, nothing works.

Thank for the help…