Please follow the below steps for installing pods to an existing project:
Open Terminal and navigate to the directory that contains your project by using the cd command:
cd ~/Path/To/Folder/Containing/Project
Next, enter the following command:
pod init
This creates a Podfile for your project.
Finally, type the following command to open the Podfile using Xcode for editing:
open -e podfile
It opens the podfile for you.
Now edit podfile to add required frameworks. it should look similar to below snippet.
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'ProjectTarget' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
pod 'Firebase/Messaging'
# Pods for ProjectTarget
target 'ProjectTarget-iOSSDKTests' do
inherit! :search_paths
# Pods for testing
end
target 'ProjectTarget-iOSSDKUITests' do
inherit! :search_paths
# Pods for testing
end
end
Then after pods will be integrated to the project and .xcworkspace will be created.
Next time open the .xcworkspace to continue with the project.