savani24 / TwitterKit5

Apache License 2.0
2 stars 23 forks source link

How to use the customized TwitterKit pod

pod 'TwitterKit5'

How to build and use the customized TwitterKit pod

  1. Build TwitterKit.zip. In the root folder of the project, run
    ./build.sh
  2. Upload the TwitterKit.zip file somewhere and get a URL points to it.
  3. Change your podspec file as: s.source = { :http => "<URL created in step 2>" }
  4. Change your Podfile as: pod "TwitterKit" ==> pod "TwitterKit", :podspec => "<URL point to the podspec created in step 3>"

How to build and push to CocoaPods TwitterKit5

  1. Build TwitterKit.zip. In the root folder of the project, run
    ./build.sh
  2. Release a new version in GitHub, say 5.0.2, upload the TwitterKit.zip just built.
  3. Update TwitterKit5.podspec, make sure s.version and s.source is correct.
  4. Deploy to CocoaPods Trunk
    pod trunk push TwitterKit5.podspec

Twitter will be discontinuing support for Twitter Kit on October 31, 2018. Read the blog post here.

Twitter Kit for iOS

Background

Twitter Kit is a native SDK to include Twitter content in mobile apps. Twitter Kit is designed to make interacting with Twitter seamless and efficient.

Using Twitter Kit from source in production applications is not officially supported. Please utilize the official binaries released via CocoaPods or Carthage.

Twitter Kit Features

Components of Twitter Kit iOS

Installation

Get started

Install using Cocoapods

To add Twitter Kit to your app, simply add TwitterKit to your Podfile.

target 'MyApp' do
  use_frameworks!
  pod 'TwitterKit'
end

Install using Carthage

To install Twitter Kit for iOS using Carthage, add the following lines to your Cartfile. For more information about how to set up Carthage and your Cartfile, see here.

binary "https://ton.twimg.com/syndication/twitterkit/ios/TwitterKit.json"
binary "https://ton.twimg.com/syndication/twitterkit/ios/TwitterCore.json"

After running carthage update, add TwitterKit.framework and TwitterShareExtensionUI.framework to the Linked Frameworks and Binaries section under General of your App target. In addition to that, make sure that when you are adding the copy-frameworks run script for Carthage that you add the following input paths:

$(SRCROOT)/Carthage/Build/iOS/TwitterCore.framework
$(SRCROOT)/Carthage/Build/iOS/TwitterKit.framework
$(SRCROOT)/Carthage/Build/iOS/TwitterShareExtensionUI.framework

Make sure that the run script phase is after your Link Binaries with Libraries phase to prevent issues with properly archiving your iOS application.

Preview Twitter Kit Features in the Demo App

Twitter Kit includes a demonstration app allowing you to preview features, and verify functionality. Create Twitter API keys as above, and then:

Code of conduct

This, and all github.com/twitter projects, are under the Twitter Open Source Code of Conduct. Additionally, see the Typelevel Code of Conduct for specific examples of harassing behavior that are not tolerated.

Contribution

The master branch of this repository contains the latest stable release of Twitter Kit.

Twitter Kit can be used as a dependency for substantial other work, and we welcome fixes and enhancements to the core libraries as well. See CONTRIBUTING.md for more details about how to contribute.

Contact

For usage questions post on Twitter Community. Please report any bugs as issues. Follow @TwitterDev on Twitter for updates.

License

Copyright 2017 Twitter, Inc. Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0