|
@@ -5,6 +5,38 @@ platform :ios, '10.0'
|
|
|
target 'BFCommonKit_Example' do
|
|
|
pod 'BFCommonKit', :path => '../'
|
|
|
|
|
|
+ post_install do |installer|
|
|
|
+
|
|
|
+ remove_swift_ui("./Pods/Kingfisher/Sources/General/KFOptionsSetter.swift")
|
|
|
+ remove_swift_ui("./Pods/Kingfisher/Sources/SwiftUI/KFImage.swift")
|
|
|
+ remove_swift_ui("./Pods/Kingfisher/Sources/SwiftUI/ImageBinder.swift")
|
|
|
+ remove_swift_ui("./Pods/Kingfisher/Sources/SwiftUI/KFImageOptions.swift")
|
|
|
+ remove_swift_ui_realm("./Pods/RealmSwift/RealmSwift/SwiftUI.swift")
|
|
|
+# remove_RealmSwift_swift_ui
|
|
|
+ installer.pods_project.targets.each do |target|
|
|
|
+ target.build_configurations.each do |config|
|
|
|
+ config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '10.0'
|
|
|
+ end
|
|
|
+ end
|
|
|
+ end
|
|
|
+
|
|
|
+def remove_swift_ui(code_file)
|
|
|
+ code_text = File.read(code_file)
|
|
|
+ code_text.gsub!(/#if canImport\(SwiftUI\) && canImport\(Combine\)(\n)/,"#if canImport(SwiftUI) && canImport(Combine) && (arch(arm64) || arch(x86_64))\n")
|
|
|
+ system("rm -rf " + code_file)
|
|
|
+ aFile = File.new(code_file, 'w+')
|
|
|
+ aFile.syswrite(code_text)
|
|
|
+ aFile.close()
|
|
|
+end
|
|
|
+
|
|
|
+def remove_swift_ui_realm (code_file)
|
|
|
+ code_text = File.read(code_file)
|
|
|
+ code_text.gsub!(/#if canImport\(SwiftUI\) && canImport\(Combine\) && swif/,'#if canImport(SwiftUI) && canImport(Combine) && (arch(arm64) || arch(x86_64)) && swif')
|
|
|
+ system("rm -rf " + code_file)
|
|
|
+ aFile = File.new(code_file, 'w+')
|
|
|
+ aFile.syswrite(code_text)
|
|
|
+ aFile.close()
|
|
|
+end
|
|
|
target 'BFCommonKit_Tests' do
|
|
|
inherit! :search_paths
|
|
|
end
|