• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

ios - CocoaPod - 错误 | [iOS] 未知 : Encountered an unknown error

[复制链接]
菜鸟教程小白 发表于 2022-12-11 19:25:28 | 显示全部楼层 |阅读模式 打印 上一主题 下一主题

我创建了一个简单的基本 cocoaPod 试图掌握制作的窍门。

我按照 raywnderlich 上的教程进行操作

这是我的 pod 规范文件

    Pod::Spec.new do |s|

      s.platform     = :ios, "9.0"
      s.ios.deployment_target = "9.0"
      s.name         = "StringyImage"
      s.summary      = "This Lib create an Image out of text fitting the rectangle that is passed"
      s.requires_arc = false

      s.version      = "1.0.3"

      s.license      = { :type => "#########", :file => "LICENSE" }

      s.author       = { "#### ###" => "###@###.com" }

      s.homepage     = "http://myGitRepoAtHome/iOS/StringyImage"

      s.source       = { :git => "http://LOGIN_INFO@myGitRepoAtHome/iOS/StringyImage.git", :tag => "#{s.version}" }

      s.framework  = "Fondation"

      s.source_files  = "StringyImage", "StringyImage/**/*.{swift}"

    s.description  = <<-DESC
    This Lib create an Image out of text fitting the rectangle that is passed. This will use a font that is veter base so we can resize it at will and keep the image clean
                       DESC
end

当我在它上面运行 lint 时,我得到了这个错误。

-> StringyImage (1.0.3)
    - ERROR | [iOS] unknown: Encountered an unknown error (No such file or directory @ rb_file_s_rename - (/private/var/folders/bv/0pq17ll10bjff4kfp3p8p6000000gr/T/CocoaPods/Lint/Pods/Pods.xcodeproj/xcuserdata/pascale.xcuserdatad/xcschemes/StringyImage.xcscheme, /private/var/folders/bv/0pq17ll10bjff4kfp3p8p6000000gr/T/CocoaPods/Lint/Pods/Pods.xcodeproj/xcshareddata/xcschemes/StringyImage.xcscheme))

所以我想知道我的 podSpec 有什么问题??

编辑 1:我在这里缺少 podspec 中的“结束”标签。但这实际上已经在实际的 podspec 文件中。

编辑2:

  StringyImage (1.0.3) - Analyzing on iOS 9.0 platform.
  Preparing

Analyzing dependencies

Inspecting targets to integrate
  Using `ARCHS` setting to build architectures of target `Pods-App`: (``)

Fetching external sources
-> Fetching podspec for `StringyImage` from `/Users/###/Documents/Libraries/StringyImage/StringyImage.podspec`

Resolving dependencies of 

Comparing resolved specification to the sandbox manifest
  A StringyImage

Downloading dependencies

-> Installing StringyImage (1.0.3)
 > Git download
 > Git download
     $ /usr/bin/git clone http://####@myGitRepoAtHome/iOS/StringyImage.git /var/folders/bv/0pq17ll10bjff4kfp3p8p6000000gr/T/d20170404-18617-l6esrk --template= --single-branch --depth 1 --branch
     1.0.3
     Cloning into '/var/folders/bv/0pq17ll10bjff4kfp3p8p6000000gr/T/d20170404-18617-l6esrk'...
     Note: checking out 'f75b7e574be6e39ce590b85b1c3181d82c7d1a48'.

     You are in 'detached HEAD' state. You can look around, make experimental
     changes and commit them, and you can discard any commits you make in this
     state without impacting any branches by performing another checkout.

     If you want to create a new branch to retain commits you create, you may
     do so (now or later) by using -b with the checkout command again. Example:

       git checkout -b <new-branch-name>

  > Copying StringyImage from `/Users/###/Library/Caches/CocoaPods/Pods/External/StringyImage/32a989f5e9af15edc8e48b268e67bcf3-1053f` to
  `../../../../../private/var/folders/bv/0pq17ll10bjff4kfp3p8p6000000gr/T/CocoaPods/Lint/Pods/StringyImage`
  - Running pre install hooks

Generating Pods project
  - Creating Pods project
  - Adding source files to Pods project
  - Adding frameworks to Pods project
  - Adding libraries to Pods project
  - Adding resources to Pods project
  - Linking headers
  - Installing targets
    - Installing target `Pods-App` iOS 9.0
      - Generating Info.plist file at `../../../../../private/var/folders/bv/0pq17ll10bjff4kfp3p8p6000000gr/T/CocoaPods/Lint/Pods/Target Support Files/Pods-App/Info.plist`
      - Generating module map file at `../../../../../private/var/folders/bv/0pq17ll10bjff4kfp3p8p6000000gr/T/CocoaPods/Lint/Pods/Target Support Files/Pods-App/Pods-App.modulemap`
      - Generating umbrella header at `../../../../../private/var/folders/bv/0pq17ll10bjff4kfp3p8p6000000gr/T/CocoaPods/Lint/Pods/Target Support Files/Pods-App/Pods-App-umbrella.h`
  - Running post install hooks
  - Writing Xcode project file to `../../../../../private/var/folders/bv/0pq17ll10bjff4kfp3p8p6000000gr/T/CocoaPods/Lint/Pods/Pods.xcodeproj`
  - Writing Lockfile in `../../../../../var/folders/bv/0pq17ll10bjff4kfp3p8p6000000gr/T/CocoaPods/Lint/Podfile.lock`
  - Writing Manifest in `../../../../../private/var/folders/bv/0pq17ll10bjff4kfp3p8p6000000gr/T/CocoaPods/Lint/Pods/Manifest.lock`

Integrating client project

[!] Please close any current Xcode sessions and use `App.xcworkspace` for this project from now on.

Integrating target `Pods-App` (`../../../../../var/folders/bv/0pq17ll10bjff4kfp3p8p6000000gr/T/CocoaPods/Lint/App.xcodeproj` project)
  Adding Build Phase '[CP] Embed Pods Frameworks' to project.
  Adding Build Phase '[CP] Copy Pods Resources' to project.
  Adding Build Phase '[CP] Check Pods Manifest.lock' to project.
  - Running post install hooks

-> Pod installation complete! There is 1 dependency from the Podfile and 1 total pod installed.
 -> StringyImage (1.0.3)
    - ERROR | [iOS] unknown: Encountered an unknown error (No such file or directory @ rb_file_s_rename - (/private/var/folders/bv/0pq17ll10bjff4kfp3p8p6000000gr/T/CocoaPods/Lint/Pods/Pods.xcodeproj/xcuserdata/pascale.xcuserdatad/xcschemes/StringyImage.xcscheme, /private/var/folders/bv/0pq17ll10bjff4kfp3p8p6000000gr/T/CocoaPods/Lint/Pods/Pods.xcodeproj/xcshareddata/xcschemes/StringyImage.xcscheme)
/usr/local/Cellar/ruby/2.4.0/lib/ruby/2.4.0/fileutils.rb:462:in `rename'
/usr/local/Cellar/ruby/2.4.0/lib/ruby/2.4.0/fileutils.rb:462:in `block in mv'
/usr/local/Cellar/ruby/2.4.0/lib/ruby/2.4.0/fileutils.rb:1454:in `block in fu_each_src_dest'
/usr/local/Cellar/ruby/2.4.0/lib/ruby/2.4.0/fileutils.rb:1470:in `fu_each_src_dest0'
/usr/local/Cellar/ruby/2.4.0/lib/ruby/2.4.0/fileutils.rb:1452:in `fu_each_src_dest'
/usr/local/Cellar/ruby/2.4.0/lib/ruby/2.4.0/fileutils.rb:451:in `mv'
/usr/local/lib/ruby/gems/2.4.0/gems/xcodeproj-1.4.2/lib/xcodeproj/scheme.rb:244:in `share_scheme'
/usr/local/lib/ruby/gems/2.4.0/gems/cocoapods-1.2.1.beta.1/lib/cocoapods/validator.rb:431:in `add_app_project_import'
/usr/local/lib/ruby/gems/2.4.0/gems/cocoapods-1.2.1.beta.1/lib/cocoapods/validator.rb:307:in `block in perform_extensive_analysis'
/usr/local/lib/ruby/gems/2.4.0/gems/cocoapods-1.2.1.beta.1/lib/cocoapods/validator.rb:298:in `each'
/usr/local/lib/ruby/gems/2.4.0/gems/cocoapods-1.2.1.beta.1/lib/cocoapods/validator.rb:298:in `perform_extensive_analysis'
/usr/local/lib/ruby/gems/2.4.0/gems/cocoapods-1.2.1.beta.1/lib/cocoapods/validator.rb:79:in `validate'
/usr/local/lib/ruby/gems/2.4.0/gems/cocoapods-1.2.1.beta.1/lib/cocoapods/command/spec/lint.rb:67:in `block in run'
/usr/local/lib/ruby/gems/2.4.0/gems/cocoapods-1.2.1.beta.1/lib/cocoapods/command/spec/lint.rb:55:in `each'
/usr/local/lib/ruby/gems/2.4.0/gems/cocoapods-1.2.1.beta.1/lib/cocoapods/command/spec/lint.rb:55:in `run'
/usr/local/lib/ruby/gems/2.4.0/gems/claide-1.0.1/lib/claide/command.rb:334:in `run'
/usr/local/lib/ruby/gems/2.4.0/gems/cocoapods-1.2.1.beta.1/lib/cocoapods/command.rb:52:in `run'
/usr/local/lib/ruby/gems/2.4.0/gems/cocoapods-1.2.1.beta.1/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:22:in `load'
/usr/local/bin/pod:22:in `<main>'
) during validation.

Analyzed 1 podspec.

[!] The spec did not pass validation, due to 1 error.

/usr/local/lib/ruby/gems/2.4.0/gems/cocoapods-1.2.1.beta.1/lib/cocoapods/command/spec/lint.rb:84:in `run'
/usr/local/lib/ruby/gems/2.4.0/gems/claide-1.0.1/lib/claide/command.rb:334:in `run'
/usr/local/lib/ruby/gems/2.4.0/gems/cocoapods-1.2.1.beta.1/lib/cocoapods/command.rb:52:in `run'
/usr/local/lib/ruby/gems/2.4.0/gems/cocoapods-1.2.1.beta.1/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:22:in `load'
/usr/local/bin/pod:22:in `<main>'

那部分是关于分离头的。但我确实检查了我的 git repo,它很好。它有它的头在海峡;)



Best Answer-推荐答案


你需要在文件底部有一个 end 来关闭 do |s| 循环

编辑 你有一个错字 - Fondation != Foundation

s.framework  = "Foundation"

无论如何你都不应该需要 Foundation

关于ios - CocoaPod - 错误 | [iOS] 未知 : Encountered an unknown error,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43214013/

回复

使用道具 举报

懒得打字嘛,点击右侧快捷回复 【右侧内容,后台自定义】
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关注0

粉丝2

帖子830918

发布主题
阅读排行 更多
广告位

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap