美文网首页
Podfile Bitcode 设置 No

Podfile Bitcode 设置 No

作者: 凨弥 | 来源:发表于2022-04-24 16:39 被阅读0次
    source 'https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git'
    platform :ios, '10.0'
    
    inhibit_all_warnings!
    
    target 'targetName' do
      # Comment the next line if you don't want to use dynamic frameworks
      use_frameworks!
    
    pod 'Alamofire' 
    pod 'Kingfisher'
    pod 'HXPHPicker'
    
    pod 'Spring', :git => 'https://github.com/MengTo/Spring.git'
    
    def player_pods(subName)
      pod 'SuperPlayer', :path => '../SDK/SuperPlayerKit/SuperPlayer.podspec', :subspecs => ["#{subName}"]
    end
    
    def beautyInstall
      pod 'CosmosEffect', :path => '../SDK/MOMOBeauty/CosmosEffect'
      pod 'MMBeautyUI','0.0.7', :source => 'https://github.com/cosmos33/MMSpecs.git'
    end
    
    
    beautyInstall
    # player_pods 'Professional'
    
    end
    
    pre_install do |installer|
        remove_swiftui()
    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
    
    
    post_install do |installer|
      installer.pods_project.targets.each do |target|
        target.build_configurations.each do |config|
        config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '10.0'
        config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET'
         #解决Xcode13.3.1 之后 architecture 失败问题
         if target.name == "HXPHPicker"
           config.build_settings['ENABLE_BITCODE'] = 'NO'
           end
        end
       end
    end
    
    

    相关文章

      网友评论

          本文标题:Podfile Bitcode 设置 No

          本文链接:https://www.haomeiwen.com/subject/ltwtyrtx.html