platform :ios, '14.0'
use_frameworks!

def shared_pods
pod 'AMPopTip', '3.4.0'
pod 'YLProgressBar'
pod 'AKPickerView'
pod 'SDWebImage'
pod 'SDWebImage/GIF'
pod 'Google-Mobile-Ads-SDK'
pod 'SwiftyJSON'
pod 'RNCryptor'
pod 'GCDWebServer', '3.4'
pod 'GCDWebServer/WebDAV', '3.4'
pod 'GCDWebServer/WebUploader', '3.4'
pod 'ReachabilitySwift'
pod 'FSPagerView'
pod 'TGPControls'
pod 'Kanna'
pod 'Toast-Swift'
pod 'AZDialogView'
pod 'WZLBadge'
pod 'SwipeCellKit', :git => 'https://github.com/ameerSpincar/SwipeCellKit.git'
pod 'GoogleAPIClientForREST/Drive'
pod 'GoogleSignIn'
pod 'Alamofire'
pod 'SwiftyDropbox'
pod 'MBProgressHUD'
pod 'SnapKit'
pod 'IGListKit'
pod 'Vivid'
pod 'DeviceKit'
pod 'IGRPhotoTweaks'
pod 'IGColorPicker'
pod 'AORangeSlider', :git => 'https://github.com/jiaohaibin/AORangeSlider.git'
pod 'YUCIHighPassSkinSmoothing'
pod 'NVActivityIndicatorView'
pod 'Presentr'
pod 'Kvitto'
pod 'TDBadgedCell'
pod 'KRPullLoader'
pod 'CRBoxInputView'
pod 'MSAL'
pod 'BoxSDK'
pod 'AliyunOSSiOS'
pod 'lottie-ios'
pod 'TPInAppReceipt'
pod "FGRoute"
pod 'M13Checkbox'
pod 'libheif'
end

target 'PV' do
    shared_pods
end

target 'PV_Share' do
    pod 'SnapKit'
end

post_install do |installer|
    installer.pods_project.targets.each do |target|
        if ['M13Checkbox', 'IGRPhotoTweaks', 'SwipeCellKit', 'AORangeSlider', 'ActiveLabel'].include? target.name
            target.build_configurations.each do |config|
                config.build_settings['SWIFT_VERSION'] = '4'
            end
        end
        shell_script_path = "Pods/Target Support Files/#{target.name}/#{target.name}-frameworks.sh"
        if File::exists?(shell_script_path)
          shell_script_input_lines = File.readlines(shell_script_path)
          shell_script_output_lines = shell_script_input_lines.map { |line| line.sub("source=\"$(readlink \"${source}\")\"", "source=\"$(readlink -f \"${source}\")\"") }
          File.open(shell_script_path, 'w') do |f|
            shell_script_output_lines.each do |line|
              f.write line
            end
          end
        end
    end
end
