XCode 8.2
Cocoapods-1.1.1
1. Open Terminal
2. Enter $ sudo gem install cocoapods command in terminal
3. Navigate to directory containing the XCode project
4. pod install
After installing cocoapod
1. Open XCode workspace file
2. Setting up bundle id and signing section properly in "General" tab in project configuration.
3. Archive/Export to Appstore