跳到主要内容

移除 VGPSDK.framework 并更新 Podfile

Frameworks, Libraries, and Embedded Content 中删除 VGPSDK.framework

5.1.2

编辑 Podfile 内容,仅保留 pod 'VGPSDK',例如:

platform :ios, '13.0'

abstract_target 'SharedPods' do
use_frameworks!
use_modular_headers!

# VGP 框架
pod 'VGPSDK'

# Unity3D 示例
workspace 'Unity-iPhone'
target 'Unity-iPhone' do
project 'Unity/Unity-iPhone'
end
target 'UnityFramework' do
project 'Unity/Unity-iPhone'
end
end

post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
cflags = config.build_settings['OTHER_CFLAGS'] || ['$(inherited)']
cflags << '-fembed-bitcode'
config.build_settings['OTHER_CFLAGS'] = cflags
config.build_settings['ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES'] = 'NO'
config.build_settings['ONLY_ACTIVE_ARCH'] = 'NO'
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0'
end
end
# 如果你在 UnityFramework 中使用 VGPSDK,请添加以下脚本
Dir.glob("Pods/**/Pods*iPhone*.xcconfig").each do |xcconfig_path|
puts "Patching #{xcconfig_path}"
text = File.read(xcconfig_path)
text.gsub!(/^OTHER_LDFLAGS.*$/, 'OTHER_LDFLAGS = -ObjC')
File.write(xcconfig_path, text)
end
end

运行命令 pod deintegratepod install

修复 UnityFramework 问题

请按照说明文档操作。