CocoaPods use_frameworks!防止XCode链接库

问题描述:

由于我已经开始(尝试)到use_frameworks!,我的本地开发窗格无法访问包含在我的项目顶层的代码。这用来工作的,如果我在下面死简单Podfile注释掉use_frameworks仍然有效:CocoaPods use_frameworks!防止XCode链接库

platform :ios, '9.0' 
use_frameworks! #comment this out and all is well 

target :test_use_frameworks do 
    pod 'STHTTPRequest', '1.0.0' #test a well known library 
    pod 'test_pod', :path => '../test_pod/' #Attempt to use that library from within local pod 
end 

我做了一个简单的的Objective-C只测试项目可访问here

当我尝试我的本地test_pod内使用STHTTPRequest从,就像这样:

STHTTPRequest * r = [STHTTPRequest requestWithURLString:@"http://www.google.com"];

我收到以下错误:

Undefined symbols for architecture x86_64: 
    "_OBJC_CLASS_$_STHTTPRequest", referenced from: 
     objc-class-ref in TestClass.o 
ld: symbol(s) not found for architecture x86_64 
clang: error: linker command failed with exit code 1 (use -v to see invocation) 

(这种情况不管我什么课使用 - 这个问题与STHTTPRequest无关......)

本地podspec也是如此简单,它可以是:

Pod::Spec.new do |s| 
    s.name    = "test_pod" 
    s.version   = "0.1.0" 
    s.summary   = "A short description of test_pod." 
    s.description  = "use_frameworks! is causing problems for me" 
    s.homepage   = "https://github.com/<GITHUB_USERNAME>/test_pod" 
    s.license   = 'MIT' 
    s.source   = { :git => "https://github.com/<GITHUB_USERNAME>/test_pod.git", :tag => s.version.to_s } 
    s.platform  = :ios, '7.0' 
    s.requires_arc = true 
    s.source_files = 'Pod/Classes/**/*' 
    s.resource_bundles = { 
    'test_pod' => ['Pod/Assets/*.png'] 
    } 
    s.dependency 'AFNetworking', '~> 2.3' 
end 

这里是SO问题我已经在这个话题中发现: 1 2 3,但他们没有帮助。我试过标题搜索路径,用户标题搜索路径框架搜索路径的所有变化,我可以想到。

再次,这个项目没有SWIFT在里面。它会很快,如果我能得到这个工作,但尚未...

我使用的CocoaPods 0.39.0

我缺少什么?

编辑:这个问题是由有帮助的CocoaPods队here

这个问题是由有帮助的CocoaPods团队回答回答here