【问题标题】:Pods frameworks.sh file errorPods frameworks.sh 文件错误
【发布时间】:2019-01-30 02:18:13
【问题描述】:

我看到以下错误:

Code Signing /Users/mikesimonetta/Library/Developer/Xcode/DerivedData/sorealty- 
bymtwudklcqeahacubxoedmawvut/Build/Products/Debug-appletvsimulator/DEV_So's Realty.app/Frameworks/Alamofire.framework with Identity -
/usr/bin/codesign --force --sign -  --preserve-metadata=identifier,entitlements '/Users/mikesimonetta/Library/Developer/Xcode/DerivedData/sorealty-bymtwudklcqeahacubxoedmawvut/Build/Products/Debug-appletvsimulator/DEV_So's Realty.app/Frameworks/Alamofire.framework'
/Users/mikesimonetta/Desktop/Projects/Clearbridge/sir-tvos/sothebysrealty/Pods/Target Support Files/Pods-So_DEV/Pods-So_DEV-frameworks.sh: eval: line 113: unexpected EOF while looking for matching `''
Command /bin/sh failed with exit code 2

我已经到处寻找解决方案。我已经清理了项目。我已经删除了派生数据。我已经删除了工作区/pods/lock 文件并从头开始构建了 pod。仍然收到此问题。

对于这个拦截器的任何帮助将不胜感激。提前致谢!

我的播客文件:

    # Uncomment this line to define a global platform for your project
platform :tvos, '9.0'

target 'So_DEV' do
  # Comment this line if you're not using Swift and don't want to use dynamic frameworks
  use_frameworks!

  # Pods for sorealty
  pod 'GooglePlacesAPI', '~> 1.1'
  pod 'Alamofire', '~> 4.7'
  pod 'SWXMLHash', '~> 4.0.0'

end

target 'So_PROD' do
# Comment this line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!

# Pods for sorealty
pod 'GooglePlacesAPI', '~> 1.1'
pod 'Alamofire', '~> 4.7'
pod 'SWXMLHash', '~> 4.0.0'

end

target 'TopShelf_DEV' do
# Comment this line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!

# Pods for sorealty
pod 'GooglePlacesAPI', '~> 1.1'
pod 'Alamofire', '~> 4.7'
pod 'SWXMLHash', '~> 4.0.0'

end

target 'TopShelf_PROD' do
# Comment this line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!

# Pods for sorealty
pod 'GooglePlacesAPI', '~> 1.1'
pod 'Alamofire', '~> 4.7'
pod 'SWXMLHash', '~> 4.0.0'

end

【问题讨论】:

  • 在此处粘贴 podfile。
  • @Praveen-K podfile 添加
  • @Praveen-K 有什么建议吗?

标签: xcode cocoapods alamofire


【解决方案1】:

遇到了同样的问题,通过在 Podfile 中添加一个 post_install 脚本来更新每个目标的 EOF 字符来解决这个问题。不完全确定根本问题是什么,以及为什么我从事的其他项目没有遇到同样的问题。

在此处找到解决方案/解决方法 - https://github.com/CocoaPods/CocoaPods/issues/7090

并通过对脚本进行一些修改来实现它。现在看起来像这样:

post_install do |installer|
    installer.aggregate_targets.each do |target|
        if target.name == 'Pods-Target_2' || target.name == 'Pods-Target_1'

            frameworkPath = "Pods/Target Support Files/#{target.name}/#{target.name}-frameworks.sh"

            puts "Found #{frameworkPath}"

            text = File.read(frameworkPath)
            new_contents = text.gsub(/'\$1'/, "\\\"$1\\\"")

            File.open(frameworkPath, "w") {|file| file.puts new_contents}

            puts "Updated #{target.name} framework file with proper EOF characters"
        end
    end
end

希望这会有所帮助!

【讨论】:

    猜你喜欢
    • 2021-02-24
    • 2023-03-13
    • 2020-02-20
    • 2018-03-05
    • 2019-08-28
    • 2020-01-14
    • 1970-01-01
    • 2016-03-26
    • 1970-01-01
    相关资源
    最近更新 更多