Files
SellyCloudSDK_demo/Example/Podfile
2026-03-26 12:05:37 +08:00

78 lines
2.5 KiB
Ruby
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
use_frameworks!
platform :ios, '14.0'
post_install do |installer|
installer.generated_projects.each do |project|
project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '14.0'
end
end
end
# 修复 libarclite 错误:确保所有 Pod 使用正确的部署目标
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0'
end
end
# Debug 构建链接 debug/lib/libwebrtc.aRelease 链接 lib/libwebrtc.a
# 直接修改 app target 的 xcconfig 文件(被主工程引用),影响最终链接
webrtc_base = File.expand_path('../../SellyCloudSDK/build/ios-arm64/vcpkg_installed/arm64-ios', __dir__)
support_files_dir = File.join(installer.sandbox.root, 'Target Support Files')
Dir.glob("#{support_files_dir}/Pods-*/*.xcconfig").each do |xcconfig_path|
config_name = xcconfig_path.end_with?('.debug.xcconfig') ? 'Debug' : 'Release'
lib_subpath = config_name == 'Debug' ? 'debug/lib' : 'lib'
webrtc_lib = "#{webrtc_base}/#{lib_subpath}/libwebrtc.a"
content = File.read(xcconfig_path)
next if content.include?('force_load')
# Append -force_load to the existing OTHER_LDFLAGS line (last occurrence wins in xcconfig)
if content =~ /^OTHER_LDFLAGS\s*=/
content = content.gsub(/^(OTHER_LDFLAGS\s*=.*)$/) { "#{$1} -force_load #{webrtc_lib}" }
else
content += "\nOTHER_LDFLAGS = $(inherited) -force_load #{webrtc_lib}\n"
end
File.write(xcconfig_path, content)
end
end
##外部仓库地址
def exterior_pods
pod 'SellyCloudSDK', :path => './SubModules/SellyCloudSDK'
end
## 内外仓库地址
def inner_pods
pod 'SellyCloudSDK', :path => '../../SellyCloudSDK'
end
target 'SellyCloudSDK_Example' do
inner_pods
pod 'YYModel'
pod 'Masonry'
pod 'FUCommonUIComponent', :path => './SubModules/FUCommonUIComponent'
pod 'FUBeautyComponent', :path => './SubModules/FUBeautyComponent'
pod 'FURenderKit', :path => './SubModules/FURenderKit'
pod 'MBProgressHUD', '~> 1.2.0'
pod 'SSZipArchive'
pod 'SDWebImage', '~> 5.0'
pod 'AFNetworking', '~> 4.0'
pod 'CocoaLumberjack', '~> 3.0'
# pod 'CocoaLumberjack'
# pod "IJKMediaFramework", :podspec => 'https://github.com/debugly/ijkplayer/releases/download/k0.8.9/IJKMediaFramework.spec.json'
target 'SellyCloudSDK_Tests' do
inherit! :search_paths
pod 'FBSnapshotTestCase'
end
end
target 'ScreenShareUploader' do
inner_pods
end