How to Integrate a CocoaPods Library
Add the Grovs SDK to your iOS project using CocoaPods.
CocoaPods is the most common dependency manager for iOS projects. Follow these steps to integrate the Grovs SDK.
If you don't have CocoaPods installed, run sudo gem install cocoapods in Terminal first.
Initialize CocoaPods in your project
Open Terminal and navigate to your project directory where your .xcodeproj file is located, then initialize CocoaPods:
cd /path/to/your/project
pod initThis creates a Podfile in your project directory.
Edit your Podfile
Open the Podfile and add the Grovs pod to your target:
target 'YourApp' do
use_frameworks!
pod 'Grovs'
endReplace 'YourApp' with your actual target name. Save and close the Podfile.
Install the pod
In Terminal, run the install command:
pod installCocoaPods will download and integrate the Grovs SDK into your workspace.
Open your workspace
Close your Xcode project if it's open. From now on, always open the .xcworkspace file:
open YourProject.xcworkspaceImport Grovs in your code
In your Swift files where you need to use the Grovs SDK:
import GrovsAfter installing pods, always use the .xcworkspace file, not the .xcodeproj file. Opening the .xcodeproj directly will result in missing dependencies.