Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The Podfile contains framework or static library targets, for which the Podfile does not contain host targets

I inherited an iOS project recently which has frameworks and uses CocoaPods. I'm trying to replicate this setup so I have a better understanding.

It has two frameworks (as Xcode projects) named RaterCommon and RaterAPIKit.

Here's the minimized version of its Podfile (I removed unnecessary parts).

platform :ios, '10.0'

inhibit_all_warnings!
use_frameworks!

workspace 'Rater'

target :Rater do
    # various pods
end

target :RaterCommon do
    project 'Libraries/RaterCommon/RaterCommon.xcodeproj'
end

target :RaterAPIKit do
    project 'Libraries/RaterAPIKit/RaterAPIKit.xcodeproj'
end

Upon running pod install, I get this warning.

The Podfile contains framework or static library targets (RaterCommon, RaterAPIKit), for which the Podfile does not contain host targets (targets which embed the framework).

And I can't import these frameworks inside my main project's source either. Even after adding them in Linked Frameworks and Libraries and Embedded Binaries in Xcode. It says No Such Module.

like image 219
Isuru Avatar asked Aug 20 '18 09:08

Isuru


1 Answers

Check that targets are really on that path

'Libraries/RaterCommon/RaterCommon.xcodeproj'
'Libraries/RaterAPIKit/RaterAPIKit.xcodeproj'

And afterwards do :

pod deintegrate && pod install
like image 175
swift2geek Avatar answered Nov 14 '22 23:11

swift2geek