Ionic Pro: Install Cocoapods on cloud package

Hello, i am using Ionic Pro for cloud packaging and build, i’m trying to download cocoapods just before the docker try to build my app on MAC for ios (cocoapods is needed for onesignal package) but i can’t manage to make it work, I can’t use internal mac ruby because

gem install -n /usr/local/bin cocoapods:1.1.1
ERROR:  While executing gem ... (Gem::FilePermissionError)
    You don't have write permissions for the /Library/Ruby/Gems/2.0.0 directory.

so i tried to install homebrew, to install another ruby that i can actually use, to install cocoapods but this is what happen when trying to do so

/usr/bin/ruby -e "$(curl -fsSL"
==> /usr/bin/sudo /bin/mkdir -p /usr/local/Cellar /usr/local/Homebrew /usr/local/Frameworks /usr/local/etc /usr/local/opt /usr/local/sbin /usr/local/share/zsh /usr/local/share/zsh/site-functions /usr/local/var
sudo: no tty present and no askpass program specified
Failed during: /usr/bin/sudo /bin/mkdir -p /usr/local/Cellar /usr/local/Homebrew /usr/local/Frameworks /usr/local/etc /usr/local/opt /usr/local/sbin /usr/local/share/zsh /usr/local/share/zsh/site-functions /usr/local/var

anyone have an idea ?

kinda disappointed with ionic pro for now, it is huge pain every time i want to do anything and badly documented with a support that is not responding at all, i have so much standard questions that should be answered inside the documentation.

1 Like

Hi there,
Having pretty much the same issue,
Slacking / mailing did not help. No support.

Having this:

Failed to restore plugin "onesignal-cordova-plugin" from config.xml. You might need to try adding it again.
Error: CocoaPods was not found. Please install version 1.0.1 or greater from --save flag or autosave detected```

Ionic Pro is a hosted and closed source service, so there is not much we, the community, can help you with, sorry. Check these:

You can - and should - contact support at

In this case you can find the answer here in the forum though:

Thanks for your time, having to switch from ionic service to phonegap isn’t a solution tho, i don’t even know why the ionic pro service redirect to this forum if they don’t take time to answer people here…

As ironic as it is, you would do better expressing this via the support link. The feedback probably won’t even be seen here.

I’m having the same issue with packaging in Ionic Pro
I’m also disappointed with the Ionic Pro.

There is a solution now:

Works well :wink:

1 Like

I tried this solution right now.
But i am getting an error within ionic pro:

[13:31:34]: ------------------------------------------------
[13:31:34]: --- Step: cordova platform add ios --nofetch ---
[13:31:34]: ------------------------------------------------
[13:31:34]: $ cordova platform add ios --nofetch
[13:31:36]: ▸ Running command: /Users/ionic/builds/project-1/ /Users/ionic/builds/project-1
[13:31:36]: ▸ Error: spawn EACCES
[13:31:37]: -------------------------
[13:31:37]: --- Step: upload_logs ---
[13:31:37]: -------------------------
[13:31:37]: ---------------------------
[13:31:37]: --- Step: shell command ---
[13:31:37]: ---------------------------
[13:31:37]: -----------------------------
[13:31:37]: --- Step: delete_keychain ---
[13:31:37]: -----------------------------
[13:31:37]: Exit status of command 'cordova platform add ios --nofetch' was 1 instead of 0.
Running command: /Users/ionic/builds/project-1/ /Users/ionic/builds/project-1
Error: spawn EACCES

Both bash-scripts are marked as executable via git.

are you using github?
It works well for us, we have a scripts folder with and

pod install --project-directory='/Users/ionic/builds/project-1/platforms/ios/'

pod repo update

And in config.xml

    <platform name="ios">
        <hook src="scripts/" type="before_platform_add" />
        <hook src="scripts/" type="after_platform_add" />

donc forget to chmod +x scripts/ and chmod +x scripts/

1 Like

Hi titouanb,
i am using ionic git and windows.

So chmod isn’t an option. But i added execute permissions using git:

According to the article chmod or git should be possible.

// edit
my fault. the git permission flag wasn’t committed

1 Like

That worked for me, thank you very much!