Cocoapods: Submodules aren't downloaded

Created on 11 Sep 2016  路  2Comments  路  Source: CocoaPods/CocoaPods

Report

What did you do?

I am working on moving my project to Swift 3.0. I started off with upgrading to the prelease version of CocoaPods (1.1.0.rc1 at time of writing).

After updating Swift Zip to the Swift 3 branch, I can no longer build the project:

No such module 'minizip'

They haven't made any changes to their podspec. In their git repository they include minizip as a git submodule. CocoaPods clones the Zip project non-recursively and so doesn't include any source files of the minizip repository.

The podspec of Zip does specify that submodules should be loaded:

s.source = { :git => "https://github.com/marmelroy/Zip.git", :tag => s.version.to_s, :submodules => true}

You can reproduce the problem by including Zip in a project with:
pod 'Zip', git: 'https://github.com/marmelroy/Zip', branch: 'swift3.0'

What did you expect to happen?

A recursive clone of the Zip repository:
git clone --recursive https://github.com/marmelroy/Zip ...

What happened instead?

A non-recursive clone (in verbose mode):

/usr/local/bin/git clone https://github.com/marmelroy/Zip /var/folders/2y/hsvthlwj7_1ccflmsbdzctpw0000gn/T/d20160910-84512-1tkddau --template=

CocoaPods Environment

Stack

   CocoaPods : 1.1.0.rc.1
        Ruby : ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-darwin15]
    RubyGems : 2.6.4
        Host : Mac OS X 10.11.6 (15G1004)
       Xcode : 8.0 (8A218a)
         Git : git version 2.10.0
Ruby lib dir : /usr/local/Cellar/ruby/2.3.0/lib
Repositories : master - https://github.com/CocoaPods/Specs.git @ 9eb548f3adbad93171861d7d210cb3e572ea629d

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.0.0
cocoapods-try         : 1.1.0

Podfile

platform :ios, '9.0'
use_frameworks!

pod 'AsyncSwift', git: 'https://github.com/duemunk/Async.git', branch: 'feature/Swift_3.0'
pod 'EmitterKit', git: 'https://github.com/aleclarson/emitter-kit.git', tag: '5.0.0'
pod 'SwiftyJSON', git: 'https://github.com/IBM-Swift/SwiftyJSON'
pod 'XCGLogger', git: 'https://github.com/DaveWoodCom/XCGLogger.git', branch: 'swift_3.0'
pod 'Zip', git: 'https://github.com/marmelroy/Zip', branch: 'swift3.0'

pod 'Crashlytics'
pod 'Fabric'

target 'Live'

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings['SWIFT_VERSION'] = '3.0'
    end
  end
end

Most helpful comment

you need to add :submodules => true to your podfile when using a specific git repo

All 2 comments

you need to add :submodules => true to your podfile when using a specific git repo

Thank you, that works great!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Curtis-Halbrook picture Curtis-Halbrook  路  3Comments

spencerkohan picture spencerkohan  路  3Comments

soleares picture soleares  路  3Comments

gerchicov-bp picture gerchicov-bp  路  3Comments

k06a picture k06a  路  3Comments