Skip to content

Installation guide

Jorge Ovalle edited this page Nov 1, 2020 · 2 revisions

To start using ReactionButton please install it via CocoaPods or SPM

CocoaPods

ReactionButton is available through CocoaPods. If you don't have Cocoapods already installed you can install it by running the code below in a terminal:

sudo gem install cocoapods

If you don't have any Podfile run:

pod init

Then open the Podfile file in your project and add this line to your app target:

pod "ReactionButton"

and it will automatically create a Podfile and integrate the pods into the project by creating a separate .xcworkspace file. You will open this file in Xcode from now on.

SPM

From Xcode 11, you can use Swift Package Manager to add ReactionButton to your project.

Select File > Swift Packages > Add Package Dependency. Enter https://github.com/lojals/ReactionButton.git in the "Choose Package Repository" dialog. In the next page, specify the version resolving rule as "Up to Next Major" with "4.0.0" as its earliest version.

After Xcode checking out the source and resolving the version, you can choose the "ReactionButton" library and add it to your app target.

Next

After installation, you could import ReactionButton to your project by adding this:

import ReactionButton

to the files in which you want to use ReactionButton.

Clone this wiki locally