How to remove CocoaPods from a project?

前端 未结 19 1327
深忆病人
深忆病人 2020-11-22 05:17

What\'s the right way of removing CocoaPods from a project? I want to remove the whole CocoaPod. Due to some limitations imposed by my client I can\'t use it. I need to have

19条回答
  •  清酒与你
    2020-11-22 05:56

    There can be two aspects developer may face.

    • Either he wants to remove pods completely from project
    • developer wants to uninstall particular framework from project from pods.

    In first case you have to use 'pod deintegrate' and follow several steps which are mentioned in the answers above.

    For second case that is if you want to uninstall any particular framework which is installed there very simple way available in your pod file just comment the framework which you want to uninstall and run pod install command.

    # Uncomment this line to define a global platform for your project
    # platform :ios, '9.0'
    target 'ProjectName' do
      # Uncomment this line if you're using Swift or would like to use dynamic frameworks
      # use_frameworks!
    
        pod 'iCarousel', '~> 1.8'
    #    pod 'Facebook-iOS-SDK', '~> 4.1'
    #    pod 'ParseFacebookUtilsV4', '~> 1.11'
    #    pod 'Parse', '~> 1.14'
    
    
    end
    

    Here I want to uninstall facebook and parse frameworks (which were installed using pods) and not iCarousel that is why I have updated my pod file like above.

    Now if I run pod install it will keep iCarousel as it is in my project and will remove facebook and parse.

提交回复
热议问题