Installing Pods in a Ionic project (iOS platform)



/usr/local/bin/pod install


  • What did you do?

I use the command “pod install” inside a iOS project generated by ionic. I know that this problem is because to create iOS platform I had to use “sudo” and now it’s kind of protected, but I’ve no other way to add iOS platform, without “sudo” it throws me another error with permissions with Cordova files.

  • What did you expect to happen?

I just expected to install Pods because I need to install OneSignal framework.

  • What happened instead?

Problems with permissions.


   CocoaPods : 1.2.1
        Ruby : ruby 2.0.0p648 (2015-12-16 revision 53162) [universal.x86_64-darwin16]
    RubyGems :
        Host : Mac OS X 10.12.5 (16F73)
       Xcode : 8.3.3 (8E3004b)
         Git : git version 2.11.0 (Apple Git-81)
Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib
Repositories : master - @ 41b515530ae13b6eb0bf18252ba1b05f515afbe6


cocoapods-deintegrate : 1.0.1
cocoapods-plugins     : 1.0.0
cocoapods-search      : 1.0.0
cocoapods-stats       : 1.0.0
cocoapods-trunk       : 1.2.0
cocoapods-try         : 1.1.0


# DO NOT MODIFY -- auto-generated by Apache Cordova
platform :ios, '8.0'
target 'Palabra de Vida España' do
	project 'Palabra de Vida España.xcodeproj'
	pod 'OneSignal', '2.5.4'


Errno::EACCES - Permission denied - /Users/oriollopezperez/Documents/wolspain-app/platforms/ios/Pods
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:245:in `mkdir'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:245:in `fu_mkdir'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:219:in `block (2 levels) in mkdir_p'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:217:in `reverse_each'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:217:in `block in mkdir_p'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:203:in `each'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:203:in `mkdir_p'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.1/lib/cocoapods/sandbox.rb:58:in `initialize'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.1/lib/cocoapods/config.rb:184:in `new'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.1/lib/cocoapods/config.rb:184:in `sandbox'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.1/lib/cocoapods/command.rb:138:in `installer_for_config'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.1/lib/cocoapods/command/install.rb:38:in `run'
/Library/Ruby/Gems/2.0.0/gems/claide-1.0.2/lib/claide/command.rb:334:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.1/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.1/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'


Is this a Ionic v1 or Ionic project? Post your ionic info please.

Have you tried to begin from scratch again? Best get rid of node completely, install nvm and then begin by installing node, ionic, creating a project, copying your code over. This fixes these problems quite often.


I did it, and even I could install ionic and cordova without “sudo”, when I go to the step of platform’s creation, I cannot without “sudo”. It’s ionic 2.

global packages:

    @ionic/cli-utils : 1.4.0
    Cordova CLI      : not installed
    Ionic CLI        : 3.4.0

local packages:

    @ionic/app-scripts              : 1.3.7
    @ionic/cli-plugin-cordova       : 1.4.0
    @ionic/cli-plugin-ionic-angular : 1.3.1
    Cordova Platforms               : none
    Ionic Framework                 : ionic-angular 3.4.2


    Node       : v6.11.0
    OS         : macOS Sierra
    Xcode      : Xcode 8.3.3 Build version 8E3004b 
    ios-deploy : not installed
    ios-sim    : not installed
    npm        : 3.10.10 


@sranonym did u get any solution . I am also not able to install pods in my xcode project