Objc 应用程序在 iOS 模拟器和 iOS 设备上成功构建。
尝试构建 Archive 时,Xcode 找不到 cocoapods 标头,构建失败,找不到“***.h”文件。
我尝试过“pod deintegrate”、“pod install”、“pod update”... 我已经删除了派生数据... 我重新安装了Xcode... 我尝试将 Podfile 安装后脚本更新为:
post_install do |installer|
# Define the project target for which you want to configure Header Search Paths
target_name = 'xxxxxxxxx'
installer.pods_project.targets.each do |target|
if target.name == target_name
target.build_configurations.each do |config|
# Adjust the Header Search Paths for archive builds
if config.name == 'Release'
config.build_settings['HEADER_SEARCH_PATHS'] ||= ['$(inherited)']
config.build_settings['HEADER_SEARCH_PATHS'] << '$(PROJECT_DIR)/Pods/Headers/Public'
config.build_settings['HEADER_SEARCH_PATHS'] << '$(PROJECT_DIR)/Pods/Headers/Public/**/*.h'
end
end
end
end
end
此 Podfile 安装后脚本可调整标头搜索路径,以确保在存档构建期间找到 Cocoapods 标头。
这些尝试都不起作用。还有其他建议吗?
对于任何寻找此问题答案的人,请查看此内容。 https://stackoverflow.com/a/29439209/231516