如何在静态库中使用AFNetworking

时间:2014-07-11 10:30:22

标签: ios xcode static-libraries cocoapods afnetworking-2

我正在使用CocoaPods来管理依赖项。假设名为A的旧项目,我有工作区A和项目Pod(包括AFNetworking,GoogleAnalytics,SBJson ......)

我现在想将核心网络功能分成静态库。我创建了名为B的新静态库并将其添加到工作区A.但是,库不能再使用AFNetworking或SBJson。

我通过互联网搜索但没有运气。

我曾尝试在Podfile中执行以下代码,但也没有运气

workspace 'A.xcworkspace'

platform :ios, :deployment_target => '7.0'

xcodeproj 'A.xcodeproj'

pod 'SBJson', '~> 3.2'
pod 'Reachability', '~> 3.1.0'
pod 'GoogleAnalytics-iOS-SDK', '~> 3.0.3'
pod 'AMSlideOutController'
pod 'TTTAttributedLabel'

target :B, :exclusive => true do
    xcodeproj 'B.xcodeproj'
    pod 'AFNetworking', '~> 2.0'
    pod 'SBJson', '~> 3.2'
end

你能帮我解决一下这个问题吗?我需要像主项目和静态库这样的东西也可以使用AFNetworking或SBJson。

干杯,

0 个答案:

没有答案
相关问题