Make sure you have the CocoaPods dependency manager installed. You can do so by executing the following command:
$ gem install cocoapods
- Create a Podfile if you don't already have one:
$ cd your-project-directory
$ pod init
- To your Podfile, add the Thunderhead SDK pod that you want to use in your app.
# Thunderhead SDK
target :YourTargetName do
pod 'Thunderhead', '~> {SDK_VERSION}'
end
- Install the pods, then open your
.xcworkspace
file to see the project in Xcode:
$ pod install
$ open your-project.xcworkspace
You can find an example project for pod installation here.
Note:
- While running
pod install
, if you get the following warnings:
[!] The `ThunderheadSampleApp [Debug]` target overrides the `OTHER_LDFLAGS` build setting defined in `Pods/Target Support Files/Pods-ThunderheadSampleApp/Pods-ThunderheadSampleApp.debug.xcconfig'. This can lead to problems with the CocoaPods installation
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.
[!] The `ThunderheadSampleApp [Release]` target overrides the `OTHER_LDFLAGS` build setting defined in `Pods/Target Support Files/Pods-ThunderheadSampleApp/Pods-ThunderheadSampleApp.release.xcconfig'. This can lead to problems with the CocoaPods installation
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.
Go to app target's Build Settings, add $(inherited) to Other Linker Flags, which will add linker flags generated in pods or see our Troubleshooting Guide.