123456789101112131415161718192021222324252627 |
- use_frameworks!
- platform :ios, '10.0'
- pre_install do |installer|
- remove_swiftui()
- end
- target 'BFCommonKit_Example' do
- pod 'BFCommonKit', :path => '../'
- target 'BFCommonKit_Tests' do
- inherit! :search_paths
- end
- end
- def remove_swiftui
- # 解决 xcode13 Release模式下SwiftUI报错问题
- system("rm -rf ./Pods/Kingfisher/Sources/SwiftUI")
- code_file = "./Pods/Kingfisher/Sources/General/KFOptionsSetter.swift"
- code_text = File.read(code_file)
- code_text.gsub!(/#if canImport\(SwiftUI\) \&\& canImport\(Combine\)(.|\n)+#endif/,'')
- system("rm -rf " + code_file)
- aFile = File.new(code_file, 'w+')
- aFile.syswrite(code_text)
- aFile.close()
- end
|