0

I am trying to integrate onesignal to ios. when i execute the command

ionic cordova platform add ios

it fails with the following:

Discovered plugin "onesignal-cordova-plugin" in config.xml. Adding it to the project
Installing "onesignal-cordova-plugin" for ios

Failed to install 'onesignal-cordova-plugin': undefined

Failed to restore plugin "onesignal-cordova-plugin" from config.xml. You might need to try adding it again. Error: rbenv: pod: command not found

The `pod' command exists in these Ruby versions:
  2.1.2

Here is excerpts of my config.xml

<?xml version='1.0' encoding='utf-8'?>
<widget id="com.app.app" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
...
    <plugin name="cordova-plugin-network-information" spec="^1.3.4" />
    <plugin name="onesignal-cordova-plugin" spec="^2.2.5" />
    <engine name="ios" spec="~4.5.4" />
</widget>
Axil
  • 3,606
  • 10
  • 62
  • 136

1 Answers1

0

You need to install cocoapods for using OneSignal SDK with IOS platform. Check the documentation here

Do:

sudo gem install cocoapods
pod repo update

Suggest you go through this post in case Ruby Gems is not installed.

Suraj Rao
  • 29,388
  • 11
  • 94
  • 103