[iOS][TwitterKit] Module 'TwitterCore' not found

ios

#1

I install TwitterCore, TwitterKit, and Fabric via CocoaPods.

// in the .podspec
ss.dependency 'TwitterCore', '~> 1.12'
ss.dependency 'TwitterKit', '~> 1.12'
ss.dependency 'Fabric', '~> 1.5'

After pod install, I tried to compile my project but it failed. It shows an error in the Xcode:

// Twitter.h
@import TwitterCore;        [!] Module 'TwitterCore' not found

I check my Pods folder and all of those framework are installed indeed.

By the way, If I downgrade TwitterCore and TwitterKit to version 1.9.0, everything works well, and the compilation succeeds.


#2

This Podfile works for me:

target 'TestTwitterCocoaPodIssue' do
  pod 'TwitterCore', '~> 1.12'
  pod 'TwitterKit', '~> 1.12'
  pod 'Fabric', '~> 1.5'
end

Your example makes it look like you have nested specs. Can you share an example of a simple project that shows this failure?

Thanks for reporting this though. We’ve seen other issues related to CocoaPods and would like to track them down.


#3

Just ran into this same issue working on a pod that will require TwitterKit as a dependency. Reproducing the error in the simple case makes no sense because the simple case is not the problem. The problem is that apparently TwitterKit cannot be used as a pod dependency which is a pretty common use case for those that use private podspec repos to manage their own internal dependencies.


#4

I’m currently using

TwitterKit (1.13.1)
TwitterCore (1.13.1)
Fabric (1.6.1)
Crashlytics (3.4.1)

and I found the same issue Module ‘TwitterCore’ not found.
Versions <=1.11.3 work fine.

Some ideas?
Cheers.


#5

@MrCararia can you share your Podspec?


#7

Hi @bonnell, those are my dependencies:

s.dependency 'AFNetworking’
s.dependency 'SHXMLParser’
s.dependency 'Parse’
s.dependency 'Fabric’
s.dependency 'LDProgressView’
s.dependency 'M13BadgeView’
s.dependency 'CSNotificationView’
s.dependency 'MWFeedParser’
s.dependency 'XCDYouTubeKit’
s.dependency 'PKRevealController’
s.dependency 'iRate’
s.dependency 'FreeStreamer’
s.dependency 'ParseCrashReporting’
s.dependency 'ParseFacebookUtilsV4’
s.dependency 'ParseTwitterUtils’
s.dependency 'AKPickerView’
s.dependency 'FBSDKCoreKit’
s.dependency 'FBSDKLoginKit’
s.dependency 'FBSDKShareKit’
s.dependency 'Crashlytics’
s.dependency 'TwitterKit’
s.dependency ‘TwitterCore’

Any advice?
Thanks


#8

Hi,
After updating TwitterKit 1.14.2, I’m getting same error
Could not build module TwitterKit
Could not build module TwitterCore
I’m using Fabric mac client for integrating Crashlytics and Twitter SDKs. I’m using Xcode 6.4 and Objective C. Any issue with Xcode version or deployment target?
Any update for this?


#9

Same issue with 1.14.6 TwitterCore / TwitterKit version.
It compiles on 1.11.3 TwitterCore / TwitterKit version.


#10

Thanks, I haven’t been able to reproduce this locally, so continuing to share podspecs and the version of Xcode that you’re running is very helpful.


#11

postmechanical, using TwitterKit (or any statically-linked pre-compiled pod) will fail as a dependency because there isn’t any way for CocoaPods to resolve name conflicts in that situation. This is a relevant discussion of that issue: https://github.com/CocoaPods/CocoaPods/issues/3267

Compiling as a dynamic framework would sort out that first issue, but introduce this second issue of needing to strip simulator architectures from the fat binary before submitting to the App Store: https://github.com/realm/realm-cocoa/issues/1163


Still getting "Module 'TwitterCore' not found" error
TwitterKit.h: Module 'TwitterCore' not found
#12

Thanks for the explanation @stevenhepting


#13