Run pod install
Install all pod dependencies correctly.
I got this error in console
Unable to find host target(s) for ***Keyboard, ***iMessageApp.
CocoaPods : 1.1.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.1 (16B2555)
Xcode : 8.1 (8B62)
Git : git version 2.9.3 (Apple Git-75)
Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib
Repositories : master - https://github.com/CocoaPods/Specs.git @ b4e272bd703ca26cae4ebf7547a0fb9d33580d5d
Executable Path: /usr/local/bin/pod
cocoapods-deintegrate : 1.0.1
cocoapods-plugins : 1.0.0
cocoapods-search : 1.0.0
cocoapods-stats : 1.0.0
cocoapods-trunk : 1.1.1
cocoapods-try : 1.1.0
platform :ios, '9.0'
project '***.xcodeproj'
use_frameworks!
inhibit_all_warnings!
def communication_pods
pod 'Argo'
pod 'Curry'
pod 'Alamofire', '~> 4.0'
end
def global_pods
communication_pods
pod 'AlamofireImage', '~> 3.1'
end
target '***App' do
global_pods
target '***Tests' do
inherit! :search_paths
pod 'Quick'
pod 'Nimble'
end
target '***UITests' do
inherit! :search_paths
end
end
target '***Keyboard' do
global_pods
end
target '***iMessageApp' do
global_pods
end
post_install do |installer|
# NOTE: If you are using a CocoaPods version prior to 0.38, replace `pods_project` with `project` on the below line
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '3.0'
end
end
end
Hi! Could you post a screenshot (or just a text list) of what shows up in the list in the "Target Dependencies" build phases for your *App?
Oh I noticed that the Target Dependencies
field was empty. Adding the two extensions target fixed the issue. Thanks
Awesome! Glad you got it fixed, and we appreciate you posting the solution!
BTW, if you want to make your Podfile a bit simpler, you could do:
[...]
abstract_target "App Pods" do
target '***App'
target '***Keyboard'
target '***iMessageApp'
pod 'Argo'
pod 'Curry'
pod 'Alamofire', '~> 4.0'
abstract_target 'Test Pods' do
inherit! :search_paths
target '***Tests'
target '***UITests'
pod 'Quick'
pod 'Nimble'
end
end
[...]
HI @orta, thanks for the tip.
In this case, how to add a pod
to the main app target only? I know this syntax results more concise, but for any customization I have to extract the target from the abstract one. Probably I'll prefer to stay with the old and not-pretty Podfile
version. Just for my personal curiosity, will a solution like the one below work?
abstract_target "Generic Pods" do
target '***Keyboard'
target '***iMessageApp'
pod 'Argo'
pod 'Curry'
pod 'Alamofire', '~> 4.0'
pod 'AlamofireImage', '~> 3.1'
abstract_target 'Main App Pods' do
inherit! :search_paths
target '***App'
pod 'FBSDKLoginKit'
pod 'FBSDKCoreKit'
pod 'FBSDKShareKit'
end
abstract_target 'Test Pods' do
inherit! :search_paths
target '***Tests'
target '***UITests'
pod 'Quick'
pod 'Nimble'
end
end
Hrm, I think if you remove the inherit! :search_paths
from Main App Pods
then it should be 馃憤
After using the new Podfile
version, I got an error
framework not found Pods_***_iMessageApp
while archiving (debug was fine).
Under linked libraries settings, each target is linked to Pods_TARGETNAME.framework
and the Pods_Generic_Pods_targetname.framework
too. Is it right?
The Podfile
I'm using is exactly the same I posted before, without the inherit! :search_paths
line as @orta said
PS: the pod install
operation removed also all my schemes
Seems like pod deintegrate
and pod install
fixed it. As I said, the target was still linked to the old .framework
Again me, just FYI, after user that Podfile
, the test targets weren't compiling. Of course I forgot to move the test abstract target inside the Main App
abstract target.
This is my pod file
# Uncomment this line to define a global platform for your project
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, :deployment_target => '9.0'
# ignore all warnings from all pods
inhibit_all_warnings!
use_frameworks!
def all_pods
pod 'IQKeyboardManager'
pod 'Instabug'
pod "TSMessages"
pod 'AsyncSwift' , :git => 'https://github.com/duemunk/Async.git'
pod 'Onboard' # not used
pod 'DZNEmptyDataSet' # not used
pod 'iOS-Slide-Menu'
pod 'Kanna', :git => 'https://github.com/tid-kijyun/Kanna.git'
pod 'HanekeSwift', :git => 'https://github.com/Haneke/HanekeSwift.git'
pod 'Alamofire'
pod 'ObjectMapper', :git => 'https://github.com/Hearst-DD/ObjectMapper.git'
pod 'SwiftyJSON', :git => 'https://github.com/SwiftyJSON/SwiftyJSON.git'
pod 'ReachabilitySwift'
pod 'SCLAlertView'
pod 'ImageLoader'
pod 'NVActivityIndicatorView', :git => 'https://github.com/ninjaprox/NVActivityIndicatorView.git'
pod 'ActiveLabel'
pod 'MWFeedParser'
pod "SwiftElegantDropdownMenu"
pod 'SwiftHEXColors'
pod 'UITextView+Placeholder'
#pod "AFDateHelper"
pod 'DateTools'
pod "SwiftDate", "~> 2.0"
pod 'APAddressBook/Swift'
pod 'FBSDKLoginKit'
pod 'FBSDKCoreKit'
pod 'FBSDKShareKit'
pod 'PusherSwift', git: 'https://github.com/pusher/pusher-websocket-swift.git', branch: 'push-notifications'
end
target 'link' do
all_pods
end
target 'ReadLaterExtension' do
all_pods
end
target 'Link Tests' do
pod 'Quick', '0.3.1'
pod 'Nimble'
end
post_install do |installer|
# NOTE: If you are using a CocoaPods version prior to 0.38, replace `pods_project` with `project` on the below line
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '3.0'
end
end
end
error is
Unable to find host target(s) for ReadLaterExtension. Please add the host targets for the embedded targets to the Podfile.
Certain kinds of targets require a host target. A host target is a "parent" target which embeds a "child" target. These are example types of targets that need a host target:
pls help me to solve this
thank you
In order to disable building/running the NSExtension you build, you should:
In my case working sucessfully
In my case I just add extension that was in error string. That fix issue. Thanks.
Most helpful comment
Oh I noticed that the
Target Dependencies
field was empty. Adding the two extensions target fixed the issue. Thanks