首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Pod frameworks.sh文件错误

Pod frameworks.sh文件错误
EN

Stack Overflow用户
提问于 2018-08-24 00:20:47
回答 1查看 1.7K关注 0票数 0

我看到以下错误:

代码语言:javascript
复制
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

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

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

我的Podfile:

代码语言:javascript
复制
    # 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
EN

回答 1

Stack Overflow用户

发布于 2018-10-24 06:40:08

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

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

并对脚本进行了一些修改,但实现方式略有不同。它现在看起来像这样:

代码语言:javascript
复制
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

希望这能有所帮助!

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/51990252

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档