The Cocoa Dependency Manager.

Overview

CocoaPods Logo

CocoaPods: The Cocoa dependency manager

Build Status Gem Version Maintainability Test Coverage

CocoaPods manages dependencies for your Xcode projects.

You specify the dependencies for your project in a simple text file: your Podfile. CocoaPods recursively resolves dependencies between libraries, fetches source code for all dependencies, and creates and maintains an Xcode workspace to build your project. The latest released Xcode versions and the prior version are supported.

Installing and updating CocoaPods is very easy. Don't miss the Installation guide and the Getting Started guide.

Project Goals

CocoaPods aims to improve the engagement with, and discoverability of, third party open-source Cocoa libraries. These project goals influence and drive the design of CocoaPods:

  • Create and share libraries, and use them in your own projects, without creating extra work for library authors. Integrate non-CocoaPods libraries and hack on your own fork of any CocoaPods library with a simple transparent Podspec standard.
  • Allow library authors to structure their libraries however they like.
  • Save time for library authors by automating a lot of Xcode work not related to their libraries' functionality.
  • Support any source management system. (Currently supported are git, svn, mercurial, bazaar, and various types of archives downloaded over HTTP.)
  • Promote a culture of distributed collaboration on pods, but also provide features only possible with a centralised solution to foster a community.
  • Build tools on top of the core Cocoa development system, including those typically deployed to other operating systems, such as web-services.
  • Provide opinionated and automated integration, but make it completely optional. You may manually integrate your CocoaPods dependencies into your Xcode project as you see fit, with or without a workspace.
  • Solve everyday problems for Cocoa and Xcode developers.

Sponsors

Lovingly sponsored by a collection of companies, see the footer of CocoaPods.org for an up-to-date list.

Collaborate

All CocoaPods development happens on GitHub. Contributions make for good karma and we welcome new contributors with joy. We take contributors seriously, and thus have a contributor code of conduct.

Links

Link Description
CocoaPods.org Homepage and search for Pods.
@CocoaPods Follow CocoaPods on Twitter to stay up to date.
Blog The CocoaPods blog.
Mailing List Feel free to ask any kind of question.
Guides Everything you want to know about CocoaPods.
Changelog See the changes introduced in each CocoaPods version.
New Pods RSS Don't miss any new Pods.
Code of Conduct Find out the standards we hold ourselves to.

Projects

CocoaPods is composed of the following projects:

Status Project Description Info
Build Status CocoaPods The CocoaPods command line tool. guides
Build Status CocoaPods Core Support for working with specifications and podfiles. docs
Build Status CocoaPods Downloader Downloaders for various source types. docs
Build Status Xcodeproj Create and modify Xcode projects from Ruby. docs
Build Status CLAide A small command-line interface framework. docs
Build Status Molinillo A powerful generic dependency resolver. docs
Build Status CocoaPods.app A full-featured and standalone installation of CocoaPods. info
Master Repo Master repository of specifications. guides
Issues
  • CocoaPods compatibility with Apple DTK (Apple Silicon)

    CocoaPods compatibility with Apple DTK (Apple Silicon)

    Currently, libffi +Ruby v2.6.0 seems to have some issues with Apple's DTK. Multiple development tools, including Homebrew (ref homebrew/brew#7857) seem to have issues working. Some have workarounds, but the core seems to be hidden somewhere in libffi (ref libffi/libffi#571)

    I will make sure to keep this issue up to date with fixes from libffi and anything else i can find.

    I received my DTK yesterday, and will try to create a fork of libffi and get it to build. As mentioned in the linked ffi issue, support for arm64 already exists, and may just need to be fixed to apply to DTK/macOS devices. Assuming I can get it to work, I will also create a fork for CP with the working version of libffi and try to get it to build.

    I believe this issue is also related to #9896 & #9890 edit: add related issue

    AppleSilicon 
    opened by MatrixSenpai 142
  • appex contains disallowed file 'Frameworks' (cocoapods 0.39.0.beta.4)

    appex contains disallowed file 'Frameworks' (cocoapods 0.39.0.beta.4)

    The iTunes Connect gave this error message to me when I wanted to upload an ipa file to. Several days I used to have a trouble with that. I found out that it was caused by cocoapods 0.39.0.beta.4. To be more accurate this problem appears when I'm adding some dependencies to a watch extension target. That is the empty folder 'Frameworks' is being created into the appex directory which causes the current issue. Downgrade to 0.38.2 have solved this problem though.

    The same behavior is for such combinations Xcode 6 + watch os 1 Xcode 7 + watch os 1 Xcode 7 + watch os 2

    Thanks.

    s3:detailed d3:hard 
    opened by mikehouse 128
  • Intermittent CDN issues

    Intermittent CDN issues

    Edit 1: ~8:30am EST

    Quick Fix

    Based on this from @d11wtq, simply changing the source in Podfile works for us in our CI (which clean installs all pods every time):

    # From:
    - source 'https://cdn.cocoapods.org/'
    
    # To:
    + source 'https://cocoapods-cdn.netlify.app/'
    # Or, go back to the pre-CDN way
    + source 'https://github.com/CocoaPods/Specs.git'
    

    Note that you should probably move this back in a few days time.

    Edit 2: ~9:00am EST

    We think it might be some custom DNS work on the CP netlify account. We've reached out in a few different routes.

    Edit 3: 3:30pm EST

    We've got in touch

    Edit 4: 8:30pm EST

    Configured DNS to proxy through Cloudflare, which provides general stability.


    Report

    What did you do?

    1. Run pod install which is currently failing because the CDN is not happy about something (500)
    Analyzing dependencies
    /usr/local/Cellar/cocoapods/1.9.3/libexec/gems/cocoapods-core-1.9.3/lib/cocoapods-core/cdn_source.rb:342: warning: URI.escape is obsolete
    [!] CDN: trunk URL couldn't be downloaded: https://cdn.cocoapods.org/CocoaPods-version.yml Response: 500 
    <html>
    <head>
    <title>Fastly error: unknown domain cdn.cocoapods.org</title>
    </head>
    <body>
    <p>Fastly error: unknown domain: cdn.cocoapods.org. Please check that this domain has been added to a service.</p>
    <p>Details: cache-fra19127-FRA</p></body></html>
    
    1. Check the status page at https://status.cocoapods.org/

    What did you expect to happen?

    The CDN should be monitored and listed, and should currently show as not operational.

    What happened instead?

    Everything shows as operational, but the CDN is not listed. "Trunk" is listed, but it has a different host name (trunk.cocoapods.org) so it's not really clear if this is the same thing or not, and also this shows as operational, so it makes me think this is something else.

    s7:workaround available 
    opened by j-h-a 103
  • App Icons not included in build from Xcode 9

    App Icons not included in build from Xcode 9

    Report

    What did you do?

    Run project on device from Xcode 9 Beta 6

    What did you expect to happen?

    Install on device and show included app icon

    What happened instead?

    Installed on device but app icon was the default as if you had not set any app icons

    Note: If project is run from Xcode 8.3.3 the correct app icon is visible. If project is run without CocoaPods the correct app icon is visible.

    CocoaPods Environment

    Stack

       CocoaPods : 1.3.1
            Ruby : ruby 2.0.0p648 (2015-12-16 revision 53162) [universal.x86_64-darwin16]
        RubyGems : 2.0.14.1
            Host : Mac OS X 10.12.6 (16G29)
           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 - https://github.com/CocoaPods/Specs.git @ 349acd3cdb79892c96f2a0dcba3e187244680d3f
    

    Installation Source

    Executable Path: /usr/local/bin/pod
    

    Plugins

    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
    

    Podfile

    # Uncomment the next line to define a global platform for your project
    # platform :ios, '9.0'
    
    target 'IconTest' do
      # Uncomment the next line if you're using Swift or would like to use dynamic frameworks
      # use_frameworks!
    
      # Pods for IconTest
      pod "DBCamera"
    end
    

    Project that demonstrates the issue

    https://github.com/harlenn/IconTest

    opened by harlenn 101
  • Error during pod install: Encountered an unknown error (783: unexpected token at

    Error during pod install: Encountered an unknown error (783: unexpected token at

    TEMPORARY WORKAROUND

    A fix will ship with CocoaPods 1.9.2. However, even if you upgrade you might still have a corrupt CocoaPods cache from before. Upgrading to 1.9.2 will ensure you wont see this issue again hopefully.

    To resolve corrupt cache part then remove the CocoaPods repo cache:

    sudo rm -rf ~/.cocoapods/repos If this does not work you are having a different issue and should file a new issue.


    Report

    What did you do?

    pod spec lint MyPodSpec.podspec --verbose --allow-warnings

    What did you expect to happen?

    ℹ Validate my podspec.

    What happened instead?

    /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-core-1.9.1/lib/cocoapods-core/cdn_source.rb:337: warning: URI.escape is obsolete
      CDN: trunk Relative path: CocoaPods-version.yml exists! Returning local because checking is only perfomed in repo update
        MyProject (1.17.0) - Analyzing on iOS 13.0 platform.
    /usr/local/lib/ruby/gems/2.7.0/gems/nanaimo-0.2.6/lib/nanaimo/writer/pbxproj.rb:13: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
    /usr/local/lib/ruby/gems/2.7.0/gems/nanaimo-0.2.6/lib/nanaimo/writer.rb:35: warning: The called method `initialize' is defined here
      Preparing
    
    Analyzing dependencies
    
    Inspecting targets to integrate
      Using `ARCHS` setting to build architectures of target `Pods-App`: (``)
    
    Fetching external sources
    -> Fetching podspec for `MyProject` from `/Users/user/Development/server/myrepo/MyProject-swift5/MyProject.podspec`
    
    Resolving dependencies of 
    /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-core-1.9.1/lib/cocoapods-core/cdn_source.rb:337: warning: URI.escape is obsolete
      CDN: trunk Relative path: CocoaPods-version.yml exists! Returning local because checking is only perfomed in repo update
    /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-core-1.9.1/lib/cocoapods-core/cdn_source.rb:337: warning: URI.escape is obsolete
      CDN: trunk Relative path: all_pods_versions_d_a_2.txt exists! Returning local because checking is only perfomed in repo update
    /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-core-1.9.1/lib/cocoapods-core/cdn_source.rb:337: warning: URI.escape is obsolete
      CDN: trunk Relative path: Specs/d/a/2/Alamofire/5.0.2/Alamofire.podspec.json exists! Returning local because checking is only perfomed in repo update
     -> MyProject (1.17.0)
        - ERROR | [iOS] unknown: Encountered an unknown error (783: unexpected token at ''
    /usr/local/Cellar/ruby/2.7.0/lib/ruby/2.7.0/json/common.rb:156:in `parse'
    /usr/local/Cellar/ruby/2.7.0/lib/ruby/2.7.0/json/common.rb:156:in `parse'
    /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-core-1.9.1/lib/cocoapods-core/specification/json.rb:61:in `from_json'
    /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-core-1.9.1/lib/cocoapods-core/specification.rb:742:in `from_string'
    /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-core-1.9.1/lib/cocoapods-core/specification.rb:716:in `from_file'
    /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-core-1.9.1/lib/cocoapods-core/source.rb:186:in `specification'
    /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-core-1.9.1/lib/cocoapods-core/specification/set.rb:58:in `block in specification_name'
    /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-core-1.9.1/lib/cocoapods-core/specification/set.rb:56:in `each'
    /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-core-1.9.1/lib/cocoapods-core/specification/set.rb:56:in `specification_name'
    /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-core-1.9.1/lib/cocoapods-core/cdn_source.rb:216:in `search'
    /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-core-1.9.1/lib/cocoapods-core/source/aggregate.rb:83:in `block in search'
    /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-core-1.9.1/lib/cocoapods-core/source/aggregate.rb:83:in `select'
    /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-core-1.9.1/lib/cocoapods-core/source/aggregate.rb:83:in `search'
    /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.1/lib/cocoapods/resolver.rb:416:in `create_set_from_sources'
    /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.1/lib/cocoapods/resolver.rb:385:in `find_cached_set'
    /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.1/lib/cocoapods/resolver.rb:360:in `specifications_for_dependency'
    /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.1/lib/cocoapods/resolver.rb:165:in `search_for'
    /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.1/lib/cocoapods/resolver.rb:274:in `block in sort_dependencies'
    /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.1/lib/cocoapods/resolver.rb:267:in `each'
    /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.1/lib/cocoapods/resolver.rb:267:in `sort_by'
    /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.1/lib/cocoapods/resolver.rb:267:in `sort_dependencies'
    /usr/local/lib/ruby/gems/2.7.0/gems/molinillo-0.6.6/lib/molinillo/delegates/specification_provider.rb:53:in `block in sort_dependencies'
    /usr/local/lib/ruby/gems/2.7.0/gems/molinillo-0.6.6/lib/molinillo/delegates/specification_provider.rb:70:in `with_no_such_dependency_error_handling'
    /usr/local/lib/ruby/gems/2.7.0/gems/molinillo-0.6.6/lib/molinillo/delegates/specification_provider.rb:52:in `sort_dependencies'
    /usr/local/lib/ruby/gems/2.7.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:754:in `push_state_for_requirements'
    /usr/local/lib/ruby/gems/2.7.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:746:in `require_nested_dependencies_for'
    /usr/local/lib/ruby/gems/2.7.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:729:in `activate_new_spec'
    /usr/local/lib/ruby/gems/2.7.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:686:in `attempt_to_activate'
    /usr/local/lib/ruby/gems/2.7.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:254:in `process_topmost_state'
    /usr/local/lib/ruby/gems/2.7.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:182:in `resolve'
    /usr/local/lib/ruby/gems/2.7.0/gems/molinillo-0.6.6/lib/molinillo/resolver.rb:43:in `resolve'
    /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.1/lib/cocoapods/resolver.rb:94:in `resolve'
    /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.1/lib/cocoapods/installer/analyzer.rb:1065:in `block in resolve_dependencies'
    /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.1/lib/cocoapods/user_interface.rb:64:in `section'
    /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.1/lib/cocoapods/installer/analyzer.rb:1063:in `resolve_dependencies'
    /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.1/lib/cocoapods/installer/analyzer.rb:124:in `analyze'
    /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.1/lib/cocoapods/installer.rb:410:in `analyze'
    /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.1/lib/cocoapods/installer.rb:235:in `block in resolve_dependencies'
    /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.1/lib/cocoapods/user_interface.rb:64:in `section'
    /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.1/lib/cocoapods/installer.rb:234:in `resolve_dependencies'
    /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.1/lib/cocoapods/validator.rb:565:in `block in download_pod'
    /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.1/lib/cocoapods/validator.rb:565:in `each'
    /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.1/lib/cocoapods/validator.rb:565:in `download_pod'
    /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.1/lib/cocoapods/validator.rb:389:in `block in perform_extensive_analysis'
    /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.1/lib/cocoapods/validator.rb:383:in `each'
    /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.1/lib/cocoapods/validator.rb:383:in `perform_extensive_analysis'
    /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.1/lib/cocoapods/validator.rb:130:in `validate'
    /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.1/lib/cocoapods/command/spec/lint.rb:78:in `block in run'
    /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.1/lib/cocoapods/command/spec/lint.rb:63:in `each'
    /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.1/lib/cocoapods/command/spec/lint.rb:63:in `run'
    /usr/local/lib/ruby/gems/2.7.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
    /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.1/lib/cocoapods/command.rb:52:in `run'
    /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.1/bin/pod:55:in `<top (required)>'
    /usr/local/bin/pod:23:in `load'
    /usr/local/bin/pod:23:in `<main>'
    ) during validation.
    

    CocoaPods Environment

       CocoaPods : 1.9.1
            Ruby : ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x86_64-darwin19]
        RubyGems : 3.1.2
            Host : Mac OS X 10.15.4 (19E266)
           Xcode : 11.4 (11E146)
             Git : git version 2.24.1 (Apple Git-126)
    Ruby lib dir : /usr/local/Cellar/ruby/2.7.0/lib
    

    Additional notes

    I've tried to fallback to previous versions of cocoapods, unsuccessfully, until I reached 1.7.5: pod _1.7.5_ spec lint MyPodSpec.podspec --verbose --allow-warnings This worked like a charm.

    MyPodSpec

    Pod::Spec.new do |s|
      s.name = 'MyPodSpec'
      s.platform = :ios, "13.0"
      s.ios.deployment_target = "13.0"
      s.swift_version         = "5.0"
      s.version = '1.17.0'
      s.source = { :git => 'https://gitlab.mycompany.it/mobile/myrepo.git', :tag => s.version.to_s }
      s.authors = { 'Me' => '[email protected]' }
      s.license = { :type => 'MIT', :file => 'LICENSE' }
      s.homepage = 'https://www.mycompanywebsite.it/'
      s.summary = 'MyPodSpec'
      s.source_files = 'MyPodSpec-swift5/MyPodSpec/Classes/OpenAPIs/**/*.swift'
      s.dependency 'Alamofire', '~> 5.0.2'
    end
    

    What am I doing wrong?

    Thanks for your help, Alessandro

    help wanted s7:workaround available 
    opened by wolfAle 99
  • Distribute via Homebrew

    Distribute via Homebrew

    It seems like we should start distributing CocoaPods via homebrew. Distributing via RubyGems is really just an implementation detail. I'm not suggesting we try to have updates reviewed each time we want to release, instead I'm suggesting we create our own homebrew tap and distribute our own formula there. An example of how this can be done, and scripted, for a Ruby based project can be found here.

    This would also help us with dealing with issues around Ruby installations, system Ruby and sudo or not.

    t3:discussion 
    opened by keith 98
  • XCode 7.1 - Include of non-modular header inside framework

    XCode 7.1 - Include of non-modular header inside framework

    I have a project that was building fine that suddenly stopped building in xcode 7.1

    The project has a development pod and also includes the GPUImage pod. The development pod used to be able to reference GPUImage via:

    #import <GPUImage/GPUImage.h>
    

    But that now gives a compile error of "Include of non-modular header inside framework module"

    I've tried setting the flag:

    CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = 'YES'
    

    but that makes no difference.

    I tried to import GPUImage via:

    @import GPUImage;
    

    but that won't compile. Is this a know issue ?

    opened by solomon23 98
  • [!] Unable to add a source with url `https://github.com/CocoaPods/Specs.git` named `master`.

    [!] Unable to add a source with url `https://github.com/CocoaPods/Specs.git` named `master`.

    localhost:~ J$ pod install Updating local specs repositories Creating shallow clone of spec repo master from https://github.com/CocoaPods/Specs.git [!] Unable to add a source with url https://github.com/CocoaPods/Specs.git named master. You can try adding it manually in ~/.cocoapods/repos or via pod repo add. localhost:~ J$

    i do not know how to resolve it

    opened by ghost 96
  • Problems with 64-bit Builds and Xcode 5 GM

    Problems with 64-bit Builds and Xcode 5 GM

    Pods was rejected as an implicit dependency for 'libPods.a' because its architectures 'armv7 armv7s' didn't contain all required architectures 'armv7 armv7s arm64'
    

    I can try and update it myself, but in the future, Cocoapods should add the arm64 architecture to the pods when detected

    opened by coneybeare 88
  • Pods copy resource script overrides default xcasset bahaviour

    Pods copy resource script overrides default xcasset bahaviour

    I have a project with different "themes" that are used for different xcode targets. For the themes I have two xcasset catalogs, one with red graphics and one with green graphics. Inside the bundles the files are named the same (so that I can simply use background.png as image name and get the correct color). Which xcasset that get copied is determined by the target membership (and ultimately by the build step "copy bundle resources"). Since cocoa pods version 0.27 I've noticed that there is a new entry in the copy pods resource script. That will cause my red graphics copied by the standard xcode build step to be replaced with the green graphics copied by the cocoa pods copy resources build step.

    t2:defect s2:confirmed d2:moderate 
    opened by barksten 85
  • Strange empty cache VERSION file issue

    Strange empty cache VERSION file issue

    Report

    What did you do?

    We were having an issue in our CI when we had two projects with different Cocoapods versions running at the same time, we were having the following issue: Errno::ENOTEMPTY - Directory not empty @ dir_s_rmdir - /Users/ec2-user/Library/Caches/CocoaPods/Pods

    Because one build was installing one version and another build was trying to install another version and it ended up one deleting the cache dir and other writing at the same time.

    We solved the issue using the CP_CACHE_DIR var and appending the Cocoapods version, this gave us a directory name like this: /Users/ec2-user/Library/Caches/CocoaPods_1.11.2

    But now there is another strange issue, this is what happened today:

    • First build pod install succeed, Cocoapods version 1.11.2
    • Second build pod install succeed, Cocoapods version 1.11.2
    • Third build failed, Cocoapods version 1.11.2

    I have a fork to add more debugging messages so this is what I am seeing:

    -> Installing NYTPhotoViewer (2.0.0)
    OZL 0.0 can_cache: true
    OZL 0.1 #<Pod::Downloader::Request:0x00007fbecff5c248 @released_pod=true, @spec=#<Pod::Specification name="NYTPhotoViewer">, @params={:git=>"https://github.com/NYTimes/NYTPhotoViewer.git", :tag=>"2.0.0"}, @name="NYTPhotoViewer">
    OZL 0.2 /Users/ec2-user/workspace/project/testflight/repo/apps/Grability/Pods/NYTPhotoViewer
    OZL 2.0 cache_path: /Users/ec2-user/Library/Caches/CocoaPods_1.11.2/Pods
    OZL 4.0 #<Pod::Downloader::Request:0x00007fbecff64f38 @released_pod=true, @spec=#<Pod::Specification name="NYTPhotoViewer">, @params={:git=>"https://github.com/NYTimes/NYTPhotoViewer.git", :tag=>"2.0.0"}, @name="NYTPhotoViewer">
    OZL 4.3 /Users/ec2-user/Library/Caches/CocoaPods_1.11.2/Pods/VERSION
    OZL 4.4 1.11.2
    OZL 4.5 false
    OZL 4.6 true
    OZL 4.7 External
    Release
    Specs
    VERSION
    OZL 4.8     5660
    OZL 4.9 External
    Release
    Specs
    VERSION
    OZL 4.10 External
    Release
    Specs
    VERSION
    OZL 4.11 1.11.2
    

    Here is the debugging code I added: image

    According to the logs for NYTPhotoViewer pod I can se the following things:

    • VERSION file had the contents 1.11.2 (OZL 4.4)
    • Root path /Users/ec2-user/Library/Caches/CocoaPods_1.11.2/Pods exists (OZL 4.6)
    • Root path contained 5660 files so the cache wasn't empty (OZL 4.8)

    The next pod to be installed was Nimble and there is where the error happened:

    -> Installing Nimble (8.1.1)
    OZL 0.0 can_cache: true
    OZL 0.1 #<Pod::Downloader::Request:0x00007fbeafcc5f40 @released_pod=true, @spec=#<Pod::Specification name="Nimble">, @params={:git=>"https://github.com/Quick/Nimble.git", :tag=>"v8.1.1"}, @name="Nimble">
    OZL 0.2 /Users/ec2-user/workspace/project/testflight/repo/apps/Grability/Pods/Nimble
    OZL 2.0 cache_path: /Users/ec2-user/Library/Caches/CocoaPods_1.11.2/Pods
    OZL 4.0 #<Pod::Downloader::Request:0x00007fbeafcdcf10 @released_pod=true, @spec=#<Pod::Specification name="Nimble">, @params={:git=>"https://github.com/Quick/Nimble.git", :tag=>"v8.1.1"}, @name="Nimble">
    OZL 4.3 /Users/ec2-user/Library/Caches/CocoaPods_1.11.2/Pods/VERSION
    OZL 4.4 
    OZL 4.5 true
    OZL 4.6 true
    OZL 4.7 External
    Release
    Specs
    VERSION
    OZL 4.8     5697
    

    As you can see in the log OZL 4.4 the VERSION file contents is empty (or nil maybe), the root cache directory still exists OZL 4.6 and it contained 5697 files but since the versions didn't match it triggered the root.rmtree code https://github.com/CocoaPods/CocoaPods/blob/f120f9fabda8bc7bea9995700e358ea22dd71cfe/lib/cocoapods/downloader/cache.rb#L168

    I thought that maybe another build was deleting the cache directory at that moment but there was no other parallel build at that moment.

    I lack out of ideas of what could be happening, if anyone has some insights would be really helpful! My last resource will be to use our fork and delete the root.rmtree code since I am guaranteeing the version via the cache directory path.

    What did you expect to happen?

    That the cache directory isn't deleted.

    Stack

       CocoaPods : 1.10.1
            Ruby : ruby 2.6.3p62 (2019-04-16 revision 67580) [universal.x86_64-darwin20]
        RubyGems : 3.0.3
            Host : macOS 11.6 (20G165)
           Xcode : 13.1 (13A1030d)
             Git : git version 2.31.1
    Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib
                   trunk - CDN - https://cdn.cocoapods.org/
    

    Installation Source

    Executable Path: /usr/local/bin/pod
    

    Plugins

    claide-plugins        : 0.9.2
    cocoapods-deintegrate : 1.0.4
    cocoapods-plugins     : 1.0.0
    cocoapods-search      : 1.0.0
    cocoapods-trunk       : 1.5.0
    cocoapods-try         : 1.2.0
    

    Podfile

    Not added since its a cache issue
    

    Project that demonstrates the issue

    • I don't have a reproducible project
    opened by omarzl 0
  • Fix typo

    Fix typo

    null

    opened by rmtheis 1
  • header_mappings_dir make public header files

    header_mappings_dir make public header files "project" visible instead of "public"??

    my podspec is like this: spec.header_mappings_dir = "XHBPFLog" spec.source_files = "XHBPFLog//*.{h,m}" spec.public_header_files = "XHBPFLog/include//*.h"

    ,when I set header_mappings_dir, even no files matched, the public header files will be set project , my english is pool: image

    opened by mrKizy2021 0
  • Feature Requests:The install command line parameter specifies the target and configuration

    Feature Requests:The install command line parameter specifies the target and configuration

    Report

    Background

    When pod install is executed, all pods listed in the podfile will be parsed, downloaded and installed, but sometimes we just want to build one of the targets or a configuration (for example, when we package and upload to the appstore) , It will take more time to deal with all the targets and pod dependencies in the configuration.

    Idea

    • In the command line, pod install adds --target parameter and --config parameter, these two parameters are optional and separate, which means they can appear at the same time or separately.

    • If it supports the above functions, you may need to do some processing on the role of the lock file. For example, you have executed pod install in the debug environment of targetA, and it has successfully worked and integrated dependencies. At this time, you switch to release In the environment, you should use a script in the build phases to remind you that you should pod install for your release environment at this time (or do not specify these two parameters, directly install all targets and configurations).

    I haven't seen any discussion about this issue at the moment, maybe I missed it, so I made this suggestion, thanks!

    opened by xuzhongping 0
  • Errno::EACCES - Permission denied @ apply2files -.../Library/Caches/CocoaPods/Pods/Release/Firebase/8.10.0-44213.lock

    Errno::EACCES - Permission denied @ apply2files -.../Library/Caches/CocoaPods/Pods/Release/Firebase/8.10.0-44213.lock

    Report

    What did you do?

    Run pod install

    What did you expect to happen?

    Install all pod dependencies correctly.

    What happened instead?

    Got the error «Errno::EACCES - Permission denied @ apply2files - C:/Users/.../Library/Caches/CocoaPods/Pods/Release/Firebase/8.10.0-44213.lock»

    CocoaPods Environment

    Stack

       CocoaPods : 1.11.2
            Ruby : ruby 3.0.3p157 (2021-11-24 revision 3fb7d2cadc) [x64-mingw32]
        RubyGems : 3.2.32
            Host : Unable to find an executable (No such file or directory - sw_vers)  ()
           Xcode : -version) ()
             Git : git version 2.34.1.windows.1
    Ruby lib dir : C:/Ruby30-x64/lib
    Repositories : cocoapods - git - https://github.com/CocoaPods/Specs.git @ 43b010342b1391524db00bce9c6fa04c0c85da15
    
    

    Installation Source

    Executable Path: C:/Ruby30-x64/bin/pod
    

    Plugins

    cocoapods-deintegrate : 1.0.5
    cocoapods-plugins     : 1.0.0
    cocoapods-search      : 1.0.1
    cocoapods-trunk       : 1.6.0
    cocoapods-try         : 1.2.0
    

    Podfile

    source 'https://github.com/CocoaPods/Specs.git'
    #source 'https://cdn.cocoapods.org/'
    
    platform :ios, '12.0'
    use_frameworks!
    
    # workaround to avoid Xcode caching of Pods that requires
    # Product -> Clean Build Folder after new Cordova plugins installed
    # Requires CocoaPods 1.6 or newer
    install! 'cocoapods', :disable_input_output_paths => true
    
    def capacitor_pods
      pod 'Capacitor', :path => '../../node_modules/@capacitor/ios'
      pod 'CapacitorCordova', :path => '../../node_modules/@capacitor/ios'
      pod 'CapacitorCommunityDatePicker', :path => '..\..\node_modules\@capacitor-community\date-picker'
      pod 'CapacitorCommunityFcm', :path => '..\..\node_modules\@capacitor-community\fcm'
      pod 'CapacitorCommunityHttp', :path => '..\..\node_modules\@capacitor-community\http'
      pod 'CapacitorApp', :path => '..\..\node_modules\@capacitor\app'
      pod 'CapacitorCamera', :path => '..\..\node_modules\@capacitor\camera'
      pod 'CapacitorDevice', :path => '..\..\node_modules\@capacitor\device'
      pod 'CapacitorPushNotifications', :path => '..\..\node_modules\@capacitor\push-notifications'
      pod 'CapacitorStorage', :path => '..\..\node_modules\@capacitor\storage'
      pod 'CordovaPlugins', :path => '../capacitor-cordova-ios-plugins'
    end
    
    target 'App' do
      capacitor_pods
      # Add your Pods here
    end
    

    Error

    Errno::EACCES - Permission denied @ apply2files - D:/temp/cocoa/cache/Pods/Release/Firebase/8.10.0-44213.lock
    C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/cocoapods-1.11.2/lib/cocoapods/downloader/cache.rb:134:in `delete'
    C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/cocoapods-1.11.2/lib/cocoapods/downloader/cache.rb:134:in `lock'
    C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/cocoapods-1.11.2/lib/cocoapods/downloader/cache.rb:99:in `write_lock'
    C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/cocoapods-1.11.2/lib/cocoapods/downloader/cache.rb:285:in `copy_and_clean'
    C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/cocoapods-1.11.2/lib/cocoapods/downloader/cache.rb:244:in `block (2 levels) in uncached_pod'
    C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/cocoapods-1.11.2/lib/cocoapods/downloader/cache.rb:242:in `each'
    C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/cocoapods-1.11.2/lib/cocoapods/downloader/cache.rb:242:in `block in uncached_pod'
    C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/cocoapods-1.11.2/lib/cocoapods/downloader/cache.rb:266:in `in_tmpdir'
    C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/cocoapods-1.11.2/lib/cocoapods/downloader/cache.rb:238:in `uncached_pod'
    C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/cocoapods-1.11.2/lib/cocoapods/downloader/cache.rb:33:in `download_pod'
    C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/cocoapods-1.11.2/lib/cocoapods/downloader.rb:42:in `download'
    C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/cocoapods-1.11.2/lib/cocoapods/installer/pod_source_installer.rb:118:in `download_source'
    C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/cocoapods-1.11.2/lib/cocoapods/installer/pod_source_installer.rb:69:in `install!'
    C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/cocoapods-1.11.2/lib/cocoapods/installer.rb:563:in `install_source_of_pod'
    C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/cocoapods-1.11.2/lib/cocoapods/installer.rb:514:in `block (2 levels) in install_pod_sources'
    C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/cocoapods-1.11.2/lib/cocoapods/user_interface.rb:86:in `titled_section'
    C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/cocoapods-1.11.2/lib/cocoapods/installer.rb:513:in `block in install_pod_sources'
    C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/cocoapods-1.11.2/lib/cocoapods/installer.rb:496:in `each'
    C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/cocoapods-1.11.2/lib/cocoapods/installer.rb:496:in `install_pod_sources'
    C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/cocoapods-1.11.2/lib/cocoapods/installer.rb:255:in `block in download_dependencies'
    C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/cocoapods-1.11.2/lib/cocoapods/user_interface.rb:64:in `section'
    C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/cocoapods-1.11.2/lib/cocoapods/installer.rb:254:in `download_dependencies'
    C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/cocoapods-1.11.2/lib/cocoapods/installer.rb:162:in `install!'
    C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/cocoapods-1.11.2/lib/cocoapods/command/install.rb:52:in `run'
    C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
    C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/cocoapods-1.11.2/lib/cocoapods/command.rb:52:in `run'
    C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/cocoapods-1.11.2/bin/pod:55:in `<top (required)>'
    C:/Ruby30-x64/bin/pod:25:in `load'
    C:/Ruby30-x64/bin/pod:25:in `<main>'
    

    More informations : OS : Windows 11 Pro Tried :

    • to remove the folder C:/Users/.../Library/Caches/CocoaPods
    • pod install --clean-install
    • pod install --allow-root
    • launched «pod install» inside an administrator command shell
    • set CP_HOME_DIR to move the folders «cache» and «folder» to D:
    • disabled Avast

    Thanks in advance for your help

    opened by Slayess 0
  • CocoaPods Install Error

    CocoaPods Install Error

    Not able to install CocoaPods

    Xcode - 13.2.1 macOs BigSur - 11.6.2

    Error ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions for the /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/gems/2.6.0 directory.

    opened by iOSamit 2
  • Crash due to 'failed to demangle witness for associated type 'Body' in conformance'

    Crash due to 'failed to demangle witness for associated type 'Body' in conformance'

    Report

    The crash is quite hard to explain, so checking out the associated project is the best way to understand. In a nutshell, when using CocoaPods and a view that contains another view that has a modifier with conditional conformance, Swift is unable to demangle the associated type of the conainer's Body. This leads to a crash at runtime:

    failed to demangle witness for associated type 'Body' in conformance 'DemanglePod.BadgeViewContainer: View' from mangled name '7' - unknown error
    

    What did you do?

    Create a project with a View that can be modified via the environment, then add a conditional conformance to View where Self == MyView and use that view in another view in the pod. Then use the container in the host app.

    What did you expect to happen?

    The app should not crash.

    What happened instead?

    The app crashes with the error

    failed to demangle witness for associated type 'Body' in conformance 'DemanglePod.BadgeViewContainer: View' from mangled name '7' - unknown error
    

    CocoaPods Environment

    Stack

       CocoaPods : 1.11.2
            Ruby : ruby 3.0.1p64 (2021-04-05 revision 0fb782ee38) [arm64-darwin21]
        RubyGems : 3.2.15
            Host : macOS 12.1 (21C52)
           Xcode : 13.2.1 (13C100)
             Git : git version 2.32.0 (Apple Git-132)
    Ruby lib dir : /Users/kerrmarin/.rvm/rubies/ruby-3.0.1/lib
    Repositories : lvmh-clienteling-ios-pod-specs - git - https://github.com/lvmh-clienteling/ios-pod-specs.git @ 78b016fdd3d8c87f7b57f9ddb676561208b7052d
    
                   trunk - CDN - https://cdn.cocoapods.org/
    

    Installation Source

    Executable Path: /Users/kerrmarin/.rvm/gems/ruby-3.0.1/bin/pod
    

    Plugins

    cocoapods-deintegrate : 1.0.5
    cocoapods-plugins     : 1.0.0
    cocoapods-search      : 1.0.1
    cocoapods-trunk       : 1.6.0
    cocoapods-try         : 1.2.0
    

    Podfile

    # Uncomment the next line to define a global platform for your project
    # platform :ios, '9.0'
    
    target 'Demangle' do
      # Comment the next line if you don't want to use dynamic frameworks
      use_frameworks!
    
      # Pods for Demangle
    
      pod 'DemanglePod', :git => 'https://github.com/kerrmarin-lvmh/DemanglePod.git', :branch => 'main'
    end
    

    Project that demonstrates the issue

    https://github.com/kerrmarin-lvmh/DemangleRepro

    opened by kerrmarin-lvmh 0
  • Generate clang submodules from umbrella headers

    Generate clang submodules from umbrella headers

    Report

    A podspec with header_dir will generate umbrella header and modulemap files into wrong directory which makes clang not generate submodules correctly.

    Project that demonstrates the issue

    https://github.com/Kudo/CocoaPodsSubmodule

    there are two podspec projects:

    • SubmoduleA without header_dir.
    • Submodule-B with header_dir.

    from the AppDelegate.m, importing submodule from Submodule-B has an error.

    Screen Shot 2022-01-04 at 11 08 29 AM

    What did you do?

    git clone https://github.com/Kudo/CocoaPodsSubmodule.git
    cd CocoaPodsSubmodule
    pod install
    open CocoaPodsSubmodule.xcworkspace
    # build from xcode
    

    What did you expect to happen?

    clang submodule should be correctly generated and @import SubmoduleB.SubclassB; should be okay in this case.

    What happened instead?

    the root cause is that an umbrella header should be placed together with the public headers. this is true for SubmoduleA but not Submodule-B.

    Screen Shot 2022-01-04 at 11 11 30 AM

    ❗️ Do it correctly coming with risk

    once clang generates submodules correctly, it will strictly check for #import format. classic double-quoted imports will highly have build errors. to have the existing projects work as usual, i am proposing to have a feature flag to enable the fix. more context:

    • https://github.com/expo/expo/issues/15622#issuecomment-997225774
    • https://github.com/expo/expo/pull/15773

    CocoaPods Environment

    Stack

       CocoaPods : 1.11.2
            Ruby : ruby 2.7.3p183 (2021-04-05 revision 6847ee089d) [arm64-darwin20]
        RubyGems : 3.1.6
            Host : macOS 12.1 (21C52)
           Xcode : 13.2.1 (13C100)
             Git : git version 2.32.0
    Ruby lib dir : /Users/kudo/.rbenv/versions/2.7.3/lib
    Repositories : trunk - CDN - https://cdn.cocoapods.org/
    

    Installation Source

    Executable Path: /Users/kudo/.rbenv/versions/2.7.3/bin/pod
    

    Plugins

    cocoapods-deintegrate : 1.0.4
    cocoapods-plugins     : 1.0.0
    cocoapods-search      : 1.0.0
    cocoapods-trunk       : 1.5.0
    cocoapods-try         : 1.2.0
    

    Podfile

    platform :ios, '12.0'
    
    target 'CocoaPodsSubmodule' do
      # use_frameworks!
    
      pod 'SubmoduleA', :podspec => 'SubmoduleA/SubmoduleA.podspec'
      pod 'Submodule-B', :podspec => 'Submodule-B/Submodule-B.podspec'
    
    end
    
    opened by Kudo 0
  • Error loading the plugin

    Error loading the plugin

    Report

    I am facing an issue where I cannot use 'pod deintegrate' and when I try any other pod command these warnings show up.

    Error loading the plugin cocoapods-deintegrate-1.0.5 Error loading the plugin cocoapods-plugins-1.0.0 Error loading the plugin cocoapods-search-1.0.1 Error loading the plugin cocoapods-trunk-1.6.0.

    Details are given below under pod env.

    What did you do?

    I have removed cocoapods I have updated Ruby Version Updated Gems Installed Cocoapods

    Again I tried the same above process after installing rbenv aswell.

    What did you expect to happen?

    I expected pod deintegrate to work

    What happened instead?

    [SAME Error "loading the plugin" ERROR GIVEN BELOW]

    [!] Unknown command: deintegrate Did you mean: update?

    Usage:

    $ pod COMMAND
    
      CocoaPods, the Cocoa library package manager.
    

    Commands:

    + cache        Manipulate the CocoaPods cache
    + env          Display pod environment
    + init         Generate a Podfile for the current directory
    + install      Install project dependencies according to versions from a
                   Podfile.lock
    + ipc          Inter-process communication
    + lib          Develop pods
    + list         List pods
    + outdated     Show outdated project dependencies
    + repo         Manage spec-repositories
    + setup        Setup the CocoaPods environment
    + spec         Manage pod specs
    + update       Update outdated project dependencies and create new Podfile.lock
    

    Options:

    --allow-root   Allows CocoaPods to run as root
    --silent       Show nothing
    --version      Show the version of the tool
    --verbose      Show more debugging information
    --no-ansi      Show output without ANSI codes
    --help         Show help banner of specified command
    

    CocoaPods Environment

    pod env | pbcopy


    Error loading the plugin cocoapods-deintegrate-1.0.5.

    NoMethodError - undefined method `activate' for #<Gem::StubSpecification:0x000000010d0e0048 @extension_dir=nil, @full_gem_path="/Users/osamaazmatkhan/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/cocoapods-deintegrate-1.0.5", @gem_dir=nil, @ignored=nil, @loaded_from="/Users/osamaazmatkhan/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/specifications/cocoapods-deintegrate-1.0.5.gemspec", @data=#<Gem::StubSpecification::StubLine:0x000000010cf4b660 @name="cocoapods-deintegrate", @version=#<Gem::Version "1.0.5">, @platform="ruby", @extensions=[], @full_name="cocoapods-deintegrate-1.0.5", @require_paths=["lib"]>, @name=nil, @spec=nil, @base_dir="/Users/osamaazmatkhan/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0", @gems_dir="/Users/osamaazmatkhan/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems", @default_gem=false>

        spec.activate
            ^^^^^^^^^
    

    Did you mean? activated? /Users/osamaazmatkhan/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/claide-1.0.3/lib/claide/command/plugin_manager.rb:93:in safe_activate_and_require' /Users/osamaazmatkhan/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/claide-1.0.3/lib/claide/command/plugin_manager.rb:31:inblock in load_plugins' /Users/osamaazmatkhan/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/claide-1.0.3/lib/claide/command/plugin_manager.rb:30:in map' /Users/osamaazmatkhan/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/claide-1.0.3/lib/claide/command/plugin_manager.rb:30:inload_plugins' /Users/osamaazmatkhan/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/claide-1.0.3/lib/claide/command.rb:326:in block in run' /Users/osamaazmatkhan/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/claide-1.0.3/lib/claide/command.rb:325:ineach' /Users/osamaazmatkhan/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/claide-1.0.3/lib/claide/command.rb:325:in run' /Users/osamaazmatkhan/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/cocoapods-1.11.2/lib/cocoapods/command.rb:52:inrun' /Users/osamaazmatkhan/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/cocoapods-1.11.2/bin/pod:55:in <top (required)>' /Users/osamaazmatkhan/.rbenv/versions/3.1.0/bin/pod:25:inload' /Users/osamaazmatkhan/.rbenv/versions/3.1.0/bin/pod:25:in `
    '


    Error loading the plugin cocoapods-plugins-1.0.0.

    NoMethodError - undefined method `activate' for #<Gem::StubSpecification:0x000000010cf6bfc8 @extension_dir=nil, @full_gem_path="/Users/osamaazmatkhan/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/cocoapods-plugins-1.0.0", @gem_dir=nil, @ignored=nil, @loaded_from="/Users/osamaazmatkhan/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/specifications/cocoapods-plugins-1.0.0.gemspec", @data=#<Gem::StubSpecification::StubLine:0x000000010cf4aa58 @name="cocoapods-plugins", @version=#<Gem::Version "1.0.0">, @platform="ruby", @extensions=[], @full_name="cocoapods-plugins-1.0.0", @require_paths=["lib"]>, @name=nil, @spec=nil, @base_dir="/Users/osamaazmatkhan/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0", @gems_dir="/Users/osamaazmatkhan/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems", @default_gem=false>

        spec.activate
            ^^^^^^^^^
    

    Did you mean? activated? /Users/osamaazmatkhan/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/claide-1.0.3/lib/claide/command/plugin_manager.rb:93:in safe_activate_and_require' /Users/osamaazmatkhan/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/claide-1.0.3/lib/claide/command/plugin_manager.rb:31:inblock in load_plugins' /Users/osamaazmatkhan/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/claide-1.0.3/lib/claide/command/plugin_manager.rb:30:in map' /Users/osamaazmatkhan/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/claide-1.0.3/lib/claide/command/plugin_manager.rb:30:inload_plugins' /Users/osamaazmatkhan/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/claide-1.0.3/lib/claide/command.rb:326:in block in run' /Users/osamaazmatkhan/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/claide-1.0.3/lib/claide/command.rb:325:ineach' /Users/osamaazmatkhan/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/claide-1.0.3/lib/claide/command.rb:325:in run' /Users/osamaazmatkhan/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/cocoapods-1.11.2/lib/cocoapods/command.rb:52:inrun' /Users/osamaazmatkhan/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/cocoapods-1.11.2/bin/pod:55:in <top (required)>' /Users/osamaazmatkhan/.rbenv/versions/3.1.0/bin/pod:25:inload' /Users/osamaazmatkhan/.rbenv/versions/3.1.0/bin/pod:25:in `
    '


    Error loading the plugin cocoapods-search-1.0.1.

    NoMethodError - undefined method `activate' for #<Gem::StubSpecification:0x000000010cf6bfa0 @extension_dir=nil, @full_gem_path="/Users/osamaazmatkhan/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/cocoapods-search-1.0.1", @gem_dir=nil, @ignored=nil, @loaded_from="/Users/osamaazmatkhan/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/specifications/cocoapods-search-1.0.1.gemspec", @data=#<Gem::StubSpecification::StubLine:0x000000010cf4a468 @name="cocoapods-search", @version=#<Gem::Version "1.0.1">, @platform="ruby", @extensions=[], @full_name="cocoapods-search-1.0.1", @require_paths=["lib"]>, @name=nil, @spec=nil, @base_dir="/Users/osamaazmatkhan/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0", @gems_dir="/Users/osamaazmatkhan/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems", @default_gem=false>

        spec.activate
            ^^^^^^^^^
    

    Did you mean? activated? /Users/osamaazmatkhan/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/claide-1.0.3/lib/claide/command/plugin_manager.rb:93:in safe_activate_and_require' /Users/osamaazmatkhan/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/claide-1.0.3/lib/claide/command/plugin_manager.rb:31:inblock in load_plugins' /Users/osamaazmatkhan/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/claide-1.0.3/lib/claide/command/plugin_manager.rb:30:in map' /Users/osamaazmatkhan/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/claide-1.0.3/lib/claide/command/plugin_manager.rb:30:inload_plugins' /Users/osamaazmatkhan/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/claide-1.0.3/lib/claide/command.rb:326:in block in run' /Users/osamaazmatkhan/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/claide-1.0.3/lib/claide/command.rb:325:ineach' /Users/osamaazmatkhan/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/claide-1.0.3/lib/claide/command.rb:325:in run' /Users/osamaazmatkhan/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/cocoapods-1.11.2/lib/cocoapods/command.rb:52:inrun' /Users/osamaazmatkhan/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/cocoapods-1.11.2/bin/pod:55:in <top (required)>' /Users/osamaazmatkhan/.rbenv/versions/3.1.0/bin/pod:25:inload' /Users/osamaazmatkhan/.rbenv/versions/3.1.0/bin/pod:25:in `
    '


    Error loading the plugin cocoapods-trunk-1.6.0.

    NoMethodError - undefined method `activate' for #<Gem::StubSpecification:0x000000010cf6bc30 @extension_dir=nil, @full_gem_path="/Users/osamaazmatkhan/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/cocoapods-trunk-1.6.0", @gem_dir=nil, @ignored=nil, @loaded_from="/Users/osamaazmatkhan/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/specifications/cocoapods-trunk-1.6.0.gemspec", @data=#<Gem::StubSpecification::StubLine:0x000000010cf498d8 @name="cocoapods-trunk", @version=#<Gem::Version "1.6.0">, @platform="ruby", @extensions=[], @full_name="cocoapods-trunk-1.6.0", @require_paths=["lib"]>, @name=nil, @spec=nil, @base_dir="/Users/osamaazmatkhan/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0", @gems_dir="/Users/osamaazmatkhan/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems", @default_gem=false>

        spec.activate
            ^^^^^^^^^
    

    Did you mean? activated? /Users/osamaazmatkhan/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/claide-1.0.3/lib/claide/command/plugin_manager.rb:93:in safe_activate_and_require' /Users/osamaazmatkhan/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/claide-1.0.3/lib/claide/command/plugin_manager.rb:31:inblock in load_plugins' /Users/osamaazmatkhan/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/claide-1.0.3/lib/claide/command/plugin_manager.rb:30:in map' /Users/osamaazmatkhan/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/claide-1.0.3/lib/claide/command/plugin_manager.rb:30:inload_plugins' /Users/osamaazmatkhan/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/claide-1.0.3/lib/claide/command.rb:326:in block in run' /Users/osamaazmatkhan/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/claide-1.0.3/lib/claide/command.rb:325:ineach' /Users/osamaazmatkhan/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/claide-1.0.3/lib/claide/command.rb:325:in run' /Users/osamaazmatkhan/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/cocoapods-1.11.2/lib/cocoapods/command.rb:52:inrun' /Users/osamaazmatkhan/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/cocoapods-1.11.2/bin/pod:55:in <top (required)>' /Users/osamaazmatkhan/.rbenv/versions/3.1.0/bin/pod:25:inload' /Users/osamaazmatkhan/.rbenv/versions/3.1.0/bin/pod:25:in `
    '


    Error loading the plugin cocoapods-try-1.2.0.

    NoMethodError - undefined method `activate' for #<Gem::StubSpecification:0x000000010cf6bc08 @extension_dir=nil, @full_gem_path="/Users/osamaazmatkhan/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/cocoapods-try-1.2.0", @gem_dir=nil, @ignored=nil, @loaded_from="/Users/osamaazmatkhan/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/specifications/cocoapods-try-1.2.0.gemspec", @data=#<Gem::StubSpecification::StubLine:0x000000010cf43e60 @name="cocoapods-try", @version=#<Gem::Version "1.2.0">, @platform="ruby", @extensions=[], @full_name="cocoapods-try-1.2.0", @require_paths=["lib"]>, @name=nil, @spec=nil, @base_dir="/Users/osamaazmatkhan/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0", @gems_dir="/Users/osamaazmatkhan/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems", @default_gem=false>

        spec.activate
            ^^^^^^^^^
    

    Did you mean? activated? /Users/osamaazmatkhan/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/claide-1.0.3/lib/claide/command/plugin_manager.rb:93:in safe_activate_and_require' /Users/osamaazmatkhan/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/claide-1.0.3/lib/claide/command/plugin_manager.rb:31:inblock in load_plugins' /Users/osamaazmatkhan/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/claide-1.0.3/lib/claide/command/plugin_manager.rb:30:in map' /Users/osamaazmatkhan/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/claide-1.0.3/lib/claide/command/plugin_manager.rb:30:inload_plugins' /Users/osamaazmatkhan/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/claide-1.0.3/lib/claide/command.rb:326:in block in run' /Users/osamaazmatkhan/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/claide-1.0.3/lib/claide/command.rb:325:ineach' /Users/osamaazmatkhan/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/claide-1.0.3/lib/claide/command.rb:325:in run' /Users/osamaazmatkhan/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/cocoapods-1.11.2/lib/cocoapods/command.rb:52:inrun' /Users/osamaazmatkhan/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/cocoapods-1.11.2/bin/pod:55:in <top (required)>' /Users/osamaazmatkhan/.rbenv/versions/3.1.0/bin/pod:25:inload' /Users/osamaazmatkhan/.rbenv/versions/3.1.0/bin/pod:25:in `
    '

    opened by osamaazmat 17
  • CocoaPods not working with dynamic framework reference

    CocoaPods not working with dynamic framework reference

    Report

    I am currently in the process of integrating CocoaPods in one of my projects but it seems that it cannot handle dynamic .xcframeworks correctly. Currently I am using the FBSDKCoreKit pod to demonstrate this issue, but this problem happens with any Pod that depends on an dynamically loaded .xcframework.

    What did you do?

    I created one iOS app target and another framework target. The framework target has a dependency on some Pod dependency which is integrated via an dynamically loaded .xcframework. At the end the framework target is linked to the iOS app target.

    One thing to note: The App target is now known to CocoaPods. It does only know about the framework target. The idea is to "hide" the pod dependency behind the framework target and let the framework target do the loading of the pod dependency. But here I am not sure if this is the correct way to do it.

    A small drawing that should demonstrate the current idea:

    ┌─────────┐ Linked via┌─────────┐      ┌────────────────────────────────┐
    │   App   │───Xcode──▶│Framework│─────▶│ Pod with dynamic .xcframework  │
    └─────────┘           └─────────┘      └────────────────────────────────┘
                               ▲
                               │
                               │
                       ┌──────────────┐
                       │              │
                       │ Dependencies │
                       │  managed by  │
                       │  CocoaPods   │
                       │              │
                       └──────────────┘
    

    What did you expect to happen?

    The app should run correctly without crashing and the dependencies are linked correctly.

    What happened instead?

    The app is crashing with errors that the Pod dependency cannot be loaded. e.g.:

    dyld[49814]: Library not loaded: @rpath/FBAEMKit.framework/FBAEMKit
      Referenced from: /Users/myUser/Library/Developer/Xcode/DerivedData/App-celtsqxqfqriwohfnqyffousnvru/Build/Products/Debug-iphonesimulator/Framework.framework/Framework
    

    I already did some investigation and it seems that the .frameworks that get extracted by https://github.com/CocoaPods/CocoaPods/blob/5c8d035624d14c76051ab6a11f80271cf702a4a0/lib/cocoapods/generator/copy_xcframework_script.rb are put into XCFrameworkIntermediates. It seems that in the setup I described they are not correctly picked up by and therefore cannot be found when launching the app. When I manually copy the .framework files on the same level as the binary executable of the app, the app is running correctly.

    CocoaPods Environment

    Stack

       CocoaPods : 1.11.2
            Ruby : ruby 3.0.0p0 (2020-12-25 revision 95aff21468) [x86_64-darwin21]
        RubyGems : 3.2.31
            Host : macOS 12.1 (21C52)
           Xcode : 13.2.1 (13C100)
             Git : git version 2.34.1
    Ruby lib dir : /Users/myUser/.rvm/rubies/ruby-3.0.0/lib
    Repositories : trunk - CDN - https://cdn.cocoapods.org/
    

    Installation Source

    Executable Path: /Users/myUser/.rvm/gems/ruby-3.0.0/bin/pod
    

    Plugins

    cocoapods-deintegrate : 1.0.5
    cocoapods-plugins     : 1.0.0
    cocoapods-search      : 1.0.1
    cocoapods-trunk       : 1.6.0
    cocoapods-try         : 1.2.0
    

    Podfile

    source 'https://cdn.cocoapods.org/'
    
    platform :ios, '15.0'
    
    
    target :Framework do
    
        use_frameworks!
    	pod 'FBSDKCoreKit', '12.2.1'
    end
    

    Project that demonstrates the issue

    You can find an example project here which demonstrates the issue: https://github.com/alexanderwe/cocoapods-framework-issue.

    My question now is:

    • Did I do something wrong with the integration of the Pod into my project ?
    • Or is this use case not supported by CocoaPods ?
    • Is there maybe an issue with the *-xcframeworks.sh script ?
    • Or is the issue occurring because CocoaPods is not aware of the App target at all and therefore the Runpath Search Paths are not set correctly ?
      • Here I have assumed that the framework target is taking care of the run path search paths and not the app target, but I am not sure

    Thanks in advance for taking a look into this issue!

    opened by alexanderwe 3
Releases(1.11.2)
Owner
The Swift & Objective C Dependency Manager
null
A dependency manager driven by SwiftPM that works for iOS/tvOS/watchOS/macOS projects.

Installation • Usage • Supporting Accio • Contributing • License ⚠️ Deprecation Notice ⚠️ With the release of Xcode 12 which includes Swift 5.3, we fe

Jamit Labs 634 Jan 5, 2022
Git Submodule Alternative for Cocoa.

CocoaSeeds Git Submodule Alternative for Cocoa. Inspired by CocoaPods. Why? iOS 7 projects do not support the use of Swift libraries from CocoaPods or

Suyeol Jeon 343 Oct 1, 2021
Swift Modules, a swift module (or package) manager #fuck_xcode #terminal_rocks

Swift Modules The Swift Modules manager similar to the JavaScript world's npm and bower Installation $ curl "https://raw.github.com/jankuca/swm/master

Jan Kuča 60 Jun 3, 2021
The Package Manager for the Swift Programming Language

Swift Package Manager Project The Swift Package Manager is a tool for managing distribution of source code, aimed at making it easy to share your code

Apple 8.6k Jan 12, 2022
A package manager that installs and runs executable Swift packages

Mint ?? A package manager that installs and runs Swift command line tool packages. $ mint run realm/[email protected] This would install and run SwiftL

Yonas Kolb 1.8k Dec 26, 2021
Automate some chores for Swift Package Manager

spmalot Create and initialize folders for new SPM projects to better fit my workflow. This is a test-run and currently aimed at executables (normal an

Erica Sadun 3 May 20, 2021
A simple, decentralized dependency manager for Cocoa

Carthage Carthage is intended to be the simplest way to add frameworks to your Cocoa application. Carthage builds your dependencies and provides you w

Carthage 14.5k Jan 12, 2022
The Cocoa Dependency Manager.

CocoaPods: The Cocoa dependency manager CocoaPods manages dependencies for your Xcode projects. You specify the dependencies for your project in a sim

null 13.5k Jan 8, 2022
Model framework for Cocoa and Cocoa Touch

Mantle Mantle makes it easy to write a simple model layer for your Cocoa or Cocoa Touch application. The Typical Model Object What's wrong with the wa

null 11.3k Jan 8, 2022
A dependency manager driven by SwiftPM that works for iOS/tvOS/watchOS/macOS projects.

Installation • Usage • Supporting Accio • Contributing • License ⚠️ Deprecation Notice ⚠️ With the release of Xcode 12 which includes Swift 5.3, we fe

Jamit Labs 633 Jan 10, 2022
A dependency manager driven by SwiftPM that works for iOS/tvOS/watchOS/macOS projects.

Installation • Usage • Supporting Accio • Contributing • License ⚠️ Deprecation Notice ⚠️ With the release of Xcode 12 which includes Swift 5.3, we fe

Jamit Labs 634 Jan 5, 2022
Eugene Kazaev 569 Jan 5, 2022
A Cocoa / Objective-C wrapper around SQLite

FMDB v2.7 This is an Objective-C wrapper around SQLite. The FMDB Mailing List: https://groups.google.com/group/fmdb Read the SQLite FAQ: https://www.s

August 13.6k Jan 5, 2022
A Cocoa NSFormatter subclass to convert dates to and from ISO-8601-formatted strings. Supports calendar, week, and ordinal formats.

ISO 8601: The only date format worth using Obligatory relevant xkcd: How to use this code in your program Add the source files to your project. Parsin

Peter Hosey 600 Nov 18, 2021
A "time ago", "time since", "relative date", or "fuzzy date" category for NSDate and iOS, Objective-C, Cocoa Touch, iPhone, iPad

Migration 2014.04.12 NSDate+TimeAgo has merged with DateTools. DateTools is the parent project and Matthew York is the project head. This project is n

Kevin Lawler 1.8k Dec 26, 2021
Git Submodule Alternative for Cocoa.

CocoaSeeds Git Submodule Alternative for Cocoa. Inspired by CocoaPods. Why? iOS 7 projects do not support the use of Swift libraries from CocoaPods or

Suyeol Jeon 343 Oct 1, 2021
:iphone: Lightweight Cocoa library for detecting the running device's model and screen size.

Lightweight Cocoa library for detecting the running device's model and screen size. With the newer  devices, developers have more work to do. This li

Sebastian Dobrincu 1.3k Dec 28, 2021
Easy JSON to NSObject mapping using Cocoa's key value coding (KVC)

#Motis Object Mapping Easy JSON to NSObject mapping using Cocoa's key value coding (KVC) Motis is a user-friendly interface with Key Value Coding that

Mobile Jazz 252 Dec 26, 2021
Cocoa framework and Obj-C dynamism bindings for ReactiveSwift.

Reactive extensions to Cocoa frameworks, built on top of ReactiveSwift. ⚠️ Looking for the Objective-C API? ?? Migrating from RAC 4.x? ?? Release Road

null 20k Jan 4, 2022
Twitter API for Cocoa developers

FHSTwitterEngine Twitter API for Cocoa developers Created by Nathaniel Symer FHSTwitterEngine can: Authenticate using OAuth and/or xAuth. Make a reque

Nathaniel Symer 215 Jul 30, 2020
A light-weight TDD / BDD framework for Objective-C & Cocoa

Specta A light-weight TDD / BDD framework for Objective-C. FEATURES An Objective-C RSpec-like BDD DSL Quick and easy set up Built on top of XCTest Exc

Specta / Expecta 2.3k Dec 28, 2021
Pure Swift Cross-platform UIKit (Cocoa Touch) implementation (Supports Linux)

Cacao Pure Swift Cross-platform UIKit (Cocoa Touch) implementation (Supports Linux) Build OS X brew install cairo sdl2 lcms2 swift build -Xlinker -L/u

null 1.1k Jan 10, 2022
:coffee: Something sweet that goes great with your Cocoa

Sugar Sugar is a sweetener for your Cocoa implementations. Table of Contents iOS Application Screen Simulator Keyboard Observer iOS Extensions UIView

HyperRedink 1.1k Jan 2, 2022
A Cocoa library to extend the Objective-C programming language.

The Extended Objective-C library extends the dynamism of the Objective-C programming language to support additional patterns present in other programm

Justin Spahr-Summers 4.5k Jan 5, 2022
Git Submodule Alternative for Cocoa.

CocoaSeeds Git Submodule Alternative for Cocoa. Inspired by CocoaPods. Why? iOS 7 projects do not support the use of Swift libraries from CocoaPods or

Suyeol Jeon 343 Oct 1, 2021
Cocoa framework and Obj-C dynamism bindings for ReactiveSwift.

Reactive extensions to Cocoa frameworks, built on top of ReactiveSwift. ⚠️ Looking for the Objective-C API? ?? Migrating from RAC 4.x? ?? Release Road

null 20k Jan 4, 2022
:coffee: Something sweet that goes great with your Cocoa

Sugar Sugar is a sweetener for your Cocoa implementations. Table of Contents iOS Application Screen Simulator Keyboard Observer iOS Extensions UIView

HyperRedink 1.1k Jan 14, 2022
SwiftUI sample app using Clean Architecture. Examples of working with CoreData persistence, networking, dependency injection, unit testing, and more.

Articles related to this project Clean Architecture for SwiftUI Programmatic navigation in SwiftUI project Separation of Concerns in Software Design C

Alexey Naumov 3k Jan 10, 2022
Compile-time safe Swift dependency injection framework

Needle is a dependency injection (DI) system for Swift. Unlike other DI frameworks, such as Cleanse, Swinject, Needle encourages hierarchical DI struc

Uber Open Source 1.1k Jan 11, 2022