由于我已经开始(尝试)到use_frameworks!,我的本地开发荚无法访问在我的项目顶层包含的代码。这过去是可行的,如果我在下面的死简单的Podfile中注释掉use_frameworks,它仍然有效:
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我制定了一个简单的目标--c--纯测试项目,它是可访问的这里。
当我试图在本地STHTTPRequest中使用test_pod时,如下所示:
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下面是我在这个主题上发现的一些问题:1 2 3.,但这些问题都没有帮助。我尝试过头搜索路径、用户头搜索路径和框架搜索路径的每个变体。
同样,这个项目中没有SWIFT。很快就会的,如果我能让它起作用的话,但还没有.
我在用cocoapods 0.39.0
我遗漏了什么?
编辑:这个问题由有帮助的Cocoapods团队这里回答
发布于 2016-01-22 17:02:58
这个问题得到了Cocoapods团队这里的回答。
https://stackoverflow.com/questions/34909389
复制相似问题