gpt4 book ai didi

ios - Cocoa pods 0.38.2 AFNetworking 添加为扩展

转载 作者:行者123 更新时间:2023-11-29 12:17:02 25 4
gpt4 key购买 nike

我从 https://stackoverflow.com/a/29335471/3628317 开始回答。一切正常,但现在我更新了 cocoa pods,看起来“pod install”不会为项目生成所有依赖项。

我发现,我需要为“pods_project”更改“project”,但它仍然不起作用。

我做错了什么\也许我错过了什么?

platform :ios, "8.0"

use_frameworks!

def shared_pods
pod 'AFNetworking'
end

target 'Asd', :exclusive => true do
shared_pods
end


target 'QuickAsd', :exclusive => true do
shared_pods
end


post_install do |installer_representation|
installer_representation.pods_project.targets.each do |target|
if target.name == "Pods-QuickAsd-AFNetworking"
target.build_configurations.each do |config|
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)', 'AF_APP_EXTENSIONS=1']
end
end
end
end

最佳答案

看起来新的 Pod (0.38.2) 和 AFNetworking (2.5.4) 版本您不必执行链接中描述的步骤来解决 AFNetworking 的问题。

  1. if target.name == "Pods-QuickAsd-AFNetworking" 更改为 if target.name == "AFNetworking"
  2. 删除由 pod init 命令创建的所有内容,并从头开始重新执行所有 pod 初始化
  3. 使用更新后的 Podfile 运行 pod install
  4. 打开.xcworkspace 文件,清理并重建项目

这对我有用。无需任何其他步骤。

关于ios - Cocoa pods 0.38.2 AFNetworking 添加为扩展,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31756824/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com