我创建了一个简单的基本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:我错过了&#34;结束&#34;在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并且很好。它的头在海峡;)
答案 0 :(得分:0)
您需要文件底部的end
关闭do |s|
循环
修改强>
你有一个拼写错误 - Fondation
!= Foundation
s.framework = "Foundation"
你无论如何都不需要基金会
答案 1 :(得分:0)
s.version
应该与标记匹配。
在我的情况下,标签为0.0.1
。因此s.version
应该是0.0.1。