Skip to content

Instantly share code, notes, and snippets.

@shoheiyokoyama
Last active October 12, 2016 02:31
Show Gist options
  • Select an option

  • Save shoheiyokoyama/f0fe7a47ee13f86e7fd9f054588ad5e5 to your computer and use it in GitHub Desktop.

Select an option

Save shoheiyokoyama/f0fe7a47ee13f86e7fd9f054588ad5e5 to your computer and use it in GitHub Desktop.
CocoaPodsへのライブラリのアップロードと注意点 ref: http://qiita.com/shoheiyokoyama/items/a419c69114c2e6725f95
$ pod lib create [Library name]
$ git add .
$ git commit -m "commit message"
$ git remote add origin https://github.com/[User name]/[Library name].git
$ git push origin master
$ echo 3.0 > .swift-version
$ gem uninstall cocoapods
$ gem install cocoapods -v 1.1.0.rc.2
$ pod trunk push LibraryName.podspec
### Error
NoMethodError - undefined method `swift_version=' for #<Pod::Validator:0x007f89ab9224f8>
$ gem uninstall cocoapods
$ gem install cocoapods -v 1.1.0.rc.3
$ git tag 0.1.0
$ git push --tags
$ pod spec lint LibraryName.podspec
$ pod trunk register [your mail address] [your name]
$ pod trunk me
$ pod trunk push LibraryName.podspec
- ERROR | [iOS] xcodebuild: Returned an unsuccessful exit code.
- NOTE | [iOS] xcodebuild: xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
=== CLEAN TARGET LibraryName OF PROJECT Pods WITH THE DEFAULT CONFIGURATION (Release) ===
Check dependencies
“Use Legacy Swift Language Version” (SWIFT_VERSION) is required to be configured correctly for targets which use Swift. Use the [Edit > Convert > To Current Swift Syntax…] menu to choose a Swift version or use the Build Settings editor to configure the build setting directly.
“Use Legacy Swift Language Version” (SWIFT_VERSION) is required to be configured correctly for targets which use Swift. Use the [Edit > Convert > To Current Swift Syntax…] menu to choose a Swift version or use the Build Settings editor to configure the build setting directly.
** CLEAN FAILED **
The following build commands failed:
Check dependencies
(1 failure)
=== BUILD TARGET LibraryName OF PROJECT Pods WITH THE DEFAULT CONFIGURATION (Release) ===
Check dependencies
“Use Legacy Swift Language Version” (SWIFT_VERSION) is required to be configured correctly for targets which use Swift. Use the [Edit > Convert > To Current Swift Syntax…] menu to choose a Swift version or use the Build Settings editor to configure the build setting directly.
“Use Legacy Swift Language Version” (SWIFT_VERSION) is required to be configured correctly for targets which use Swift. Use the [Edit > Convert > To Current Swift Syntax…] menu to choose a Swift version or use the Build Settings editor to configure the build setting directly.
** BUILD FAILED **
The following build commands failed:
Check dependencies
(1 failure)
-> LibraryName (0.1.0)
- ERROR | [iOS] xcodebuild: Returned an unsuccessful exit code.
Analyzed 1 podspec.
[!] The spec did not pass validation, due to 1 error.
$ echo 2.3 > .swift-version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment