2016-01-20 65 views
1

由於我已經開始(嘗試)到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

回答

0

這個問題是由有幫助的CocoaPods團隊回答回答here