How to remove CocoaPods from a project?

前端 未结 19 1329
深忆病人
深忆病人 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条回答
  • I don't think you need to deintegrate anymore. I was able to do it with the following command in terminal:

    pod install

    and it automatically removed the ones that are no longer in the podfile

    0 讨论(0)
  • 2020-11-22 05:51
    1. Remove the podfile name from .plist
    2. Reinstall the pod again (use this link for pod installation)
    0 讨论(0)
  • 2020-11-22 05:54

    I am gonna write what iv done very briefly (to delete any CocoaPods from my project)..

    1. delete any added folder (frameworks, Pods,...)
    2. delete any added files (PROJECT.xcworkspace, PodFile, PodFile.lock, Pods-PROJECT.debug.xcconfig, Pods-PROJECT.release.xcconfig,...)
    3. just leave your original ones (PROJECT, PROJECT_Tests, PROJECT.xcodeproj)
    4. remove framework reference from the project on xcode

    To remove the framework reference from xcode:

    1. Use the Project Navigator
    2. Select Project
    3. Select Target PROJECT
    4. Select Build Phases from the top options
    5. leave the default groups (Target Dependencies, Compile Sources, Linked Binary with Libraries, Copy Bundle Resources) and delete any other
    0 讨论(0)
  • 2020-11-22 05:56

    Keith's answer is great - I just want to point out that because Cocoapods 0.36 is starting to support Dynamic Frameworks, if you are using 'use_frameworks!' in your 'Podfile' and you wish to remove the Cocoapods, you must do this:

    • Under Build Phases delete Embed Pods Frameworks phase.
    0 讨论(0)
  • 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.

    0 讨论(0)
  • 2020-11-22 05:56

    pictorial representation detailed

    0 讨论(0)
提交回复
热议问题