Using iVersion in iOS | Generated by AI
To use the iVersion pod in your iOS project, you need to follow these steps:
-
Open Your Project in Xcode: Make sure you have your Xcode project open where you want to add the
iVersionpod. - Initialize CocoaPods: If you haven’t already initialized CocoaPods in your project, open the Terminal, navigate to your project directory, and run:
pod initThis will create a
Podfilein your project directory. - Edit the Podfile: Open the
Podfilein a text editor or Xcode. Add theiVersionpod to yourPodfileby including the following line within the target section:pod 'iVersion', '1.11.4' - Install the Pod: Save the
Podfileand go back to the Terminal. Run the following command to install theiVersionpod:pod install -
Open the
.xcworkspaceFile: After the installation is complete, close your Xcode project if it’s open, and then open the newly created.xcworkspacefile. This file is usually located in the same directory as your original.xcodeprojfile. - Import iVersion: In your Swift or Objective-C files, import the
iVersionmodule to start using it:import iVersion - Use iVersion in Your Code: Now you can use the
iVersionlibrary in your project. For example, you can check the app version or build number using the methods provided byiVersion.
By following these steps, you should be able to successfully integrate and use the iVersion pod in your iOS project.