https://github.com/segment-integrations/analytics-ios-integration-nielsen-dcr
The Nielsen DCR analytics-ios integration
https://github.com/segment-integrations/analytics-ios-integration-nielsen-dcr
ios
Last synced: 10 months ago
JSON representation
The Nielsen DCR analytics-ios integration
- Host: GitHub
- URL: https://github.com/segment-integrations/analytics-ios-integration-nielsen-dcr
- Owner: segment-integrations
- License: mit
- Created: 2017-08-17T22:54:54.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2022-07-11T17:47:52.000Z (almost 4 years ago)
- Last Synced: 2025-08-16T03:20:28.325Z (10 months ago)
- Topics: ios
- Language: Objective-C
- Size: 92.8 KB
- Stars: 1
- Watchers: 2
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Segment-Nielsen-DCR
[](https://circleci.com/gh/segment-integrations/analytics-ios-integration-nielsen-dcr)
[](http://cocoapods.org/pods/Segment-Nielsen-DCR)
[](http://cocoapods.org/pods/Segment-Nielsen-DCR)
[](http://cocoapods.org/pods/Segment-Nielsen-DCR)
## Installation
The Nielsen App SDK as of version 6.0.0.0 is compatible with Apple iOS version 8.0 and above.
Segment-Nielsen-DCR SDK is not available through [CocoaPods](http://cocoapods.org) trunk due to Nielsen's SDK being in a private spec repo. To install the Segment-Nielsen-DCR pod, add the following line to your Podfile:
```ruby
pod "Segment-Nielsen-DCR", :git => 'https://github.com/segment-integrations/analytics-ios-integration-nielsen-dcr.git', :tag => '1.5.1'
```
The integration relies on the the Nielsen framework, which can either be installed via Cocoapods or by manually adding the framework. You will need to have a Nielsen representative to get started.
## Xcode 12
The Nielsen Cocoapod (8.0.0.0) specifies iOS 8.0 as it's minimum target. This has the negative effect of generating ones Cocoapod workspace with invalid values. To fix this, the following script can be added to the end of the `Podfile`:
```
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET'
end
end
end
```
This will remove the deployment target settings and fall back to what has been specified within the Xcode Project itself.
It should also be noted that the Nielsen Cocoapod does not include an `arm64` slice. It may be necessary for `EXCLUDED_ARCHS[sdk=iphonesimulator*]` to be set to exclude `arm64` in your project.
## Cocoapods
When using the Nielsen SDK version 6.2.0.0 and above, Nielsen recommends installation via Cocoapods, and Apple recommends using the dynamic framework.
Installation of the Dynamic Nielsen App Framework SDK via Cocoapods requires a Cocoapods version 1.6.1 or higher. Installation of the Static Nielsen App Framework SDK via Cocoapods requires a Cocoapods version 1.4.0 or higher.
1. **Set your repository credentials.** The first step is to add the credentials received from Nielsen into your `.netrc` file. Navigate to your home folder and create a file called `.netrc`
```
cd ~/
vi .netrc
```
You will need to fill out a license agreement form and have the contact information for your Nielsen representative in order to obtain the credentials [here](https://engineeringportal.nielsen.com/docs/Special:Downloads). Add the credentials in the following format:
```
machine raw.githubusercontent.com
login
password
```
2. **Add the source to your Podfile**
Dynamic Framework (Note: you will need to include `use_frameworks!`)
```
source 'https://github.com/NielsenDigitalSDK/nielsenappsdk-ios-specs-dynamic.git'
```
Static Framework
```
source 'https://github.com/NielsenDigitalSDK/nielsenappsdk-ios-specs.git'
```
3. **Add the pod to your Podfile**
`pod NielsenAppSDK`
4. **Install the pods**
`pod install`
***A list of full instructions can be found [here](https://engineeringportal.nielsen.com/docs/Digital_Measurement_iOS_Artifactory_Guide)***
## Manual
Navigate to [Nielsen's Engineering Site](https://engineeringportal.nielsen.com/docs/Main_Page) and download the following Video framework:

There will be an NDA to sign prior to accessing the download. Nielsen requires you fill out your company info and have a Nielsen representative before getting started.
Nielsen also requires the following frameworks, which must be included into Link Binary with Libraries (within app target’s Build Phases)
- AdSupport.framework
- SystemConfiguration.framework
- CoreLocation.framework (Not applicable for International (Germany))
- libsqlite3
## Usage
After you have properly installed the Nielsen App SDK, Register the factory with Segment SDK in the `application:didFinishLaunchingWithOptions` method of your `AppDelegate`:
`#import `
```
NSString *const SEGMENT_WRITE_KEY = @" ... ";
SEGAnalyticsConfiguration *config = [SEGAnalyticsConfiguration configurationWithWriteKey:SEGMENT_WRITE_KEY];
[config use:[SEGNielsenDCRIntegrationFactory instance]];
[SEGAnalytics setupWithConfiguration:config];
```
## License
Segment-Nielsen-DCR is available under the MIT license. See the LICENSE file for more info.