Krelborn / KILabel

A simple to use drop in replacement for UILabel for iOS 7 and above that highlights links such as URLs, twitter style usernames and hashtags and makes them touchable.
MIT License
470 stars 132 forks source link

Create Podspec and Integrate with Cocoa Pods #8

Closed vilanovi closed 9 years ago

vilanovi commented 10 years ago

Hi,

It could be very useful if you integrate the repository in Cocoa Pods. I wanted to do it in my forked repository but as initially it is your code, better to do it yourself.

You must create a KILabel.podspec file in the root directory of the repository with the following content:

Pod::Spec.new do |s|

  s.name         = "KILabel"
  s.version      = "0.1.0"
  s.summary      = "UILabel with link, hashtags and user detectors"
  s.description  = "A simple to use drop in replacement for UILabel for iOS 7 that provides automatic detection of links such as URLs and Twitter styled usernames (@) and hashtags (#)."
  s.homepage     = "https://github.com/Kerlborn/KILabel"
  s.license      = { :type => 'MIT', :file => 'LICENSE' }
  s.author       = { "<#YOUR_NAME#>" => "<#YOUR EMAIL#>" }
  s.social_media_url = "<#YOUR_TWITTER_URL_LINK_OR_EQUIVALENT#>"
  s.platform     = :ios
  s.source       = { :git => "https://github.com/Kerlborn/KILabel.git", :tag => "0.1.0" }
  s.source_files = 'KILabel/Source/KILabel.{h,m}'
  s.framework  = 'UIKit'
  s.requires_arc = true

end

Remember to create a git tag for the desired version (0.1.0 in the example above) and merge with the CocoaPods/Specs repository. For more information check "how to create a pod" in http://cocoapods.org.

Thanks,

Joan

benjaminjackson commented 9 years ago

+1 on this!

Krelborn commented 9 years ago

Done in 1.0.0 release.

You can now use pod 'KILabel' in your podfiles to work with the 1.0.0 release version. Be careful as this version has a couple of breaking changes because some things have been renamed. Nothing too bad but you might want to check the documentation first.