How to use pod try to test an iOS library

pod try :

Using a third-party library may break an existing project if it is not properly tested. Again, for UI components, it is really hard to choose the perfect one. There are a lot of libraries available for any types of UI like a button or a dialogue.

You can download and try one library by creating a demo project but that will be a lengthy process.

Cocoapods provides one easy way to try out libraries without manually downloading a project. This is the pod try command.

You can use pod try with the project name to try it out. In this tutorial, I will show you how to use pod try with one popular iOS library called material-components-ios.

Using pod try :

Material components iOS library can be used to easily integrate material design UI components in an iOS app. But it has a lot of different components or UI elements and without trying any one of them in a simulator or iPhone, it is hard to choose the perfect one.

Material components provide pod try to try out one of its sample projects before using the main library. You can check their Github page to learn more about it.

Run the command :

Open one terminal, put the below command and hit enter :

pod try MaterialComponents

It will show you a list of demo projects to choose from :

pod try example

Write one of the above selection numbers and hit enter. For example, I have selected 3. It will automatically download that project to a temporary folder and open Xcode automatically once done.

pod try example

Now, you can just run it on a simulator like any other iOS project.