Digital Measurement iOS Artifactory Guide: Difference between revisions
From Engineering Client Portal
ColinBrown (talk | contribs) |
ColinBrown (talk | contribs) |
||
Line 185: | Line 185: | ||
The following Pod versions are now available: (For 'kids' apps, please use the NoId framework (EG: NielsenNoIdAppSDK, NielsenNoIdTVOSAppSDK) | The following Pod versions are now available: (For 'kids' apps, please use the NoId framework (EG: NielsenNoIdAppSDK, NielsenNoIdTVOSAppSDK) | ||
{| class="wikitable" style="width: | {| class="wikitable" style="width: 30%;" | ||
|- style="background-color:#efefef;" | |- style="background-color:#efefef;" | ||
! App Flavor Name | ! App Flavor Name | ||
|- | |- | ||
| NielsenAppSDK | | NielsenAppSDK | ||
|- | |- | ||
| NielsenNoAdAppSDK | | NielsenNoAdAppSDK | ||
|- | |- | ||
| NielsenNoAdTVOSAppSDK | | NielsenNoAdTVOSAppSDK | ||
|- | |- | ||
| NielsenNoIdAppSDK | | NielsenNoIdAppSDK | ||
|- | |- | ||
| NielsenNoIdTVOSAppSDK | | NielsenNoIdTVOSAppSDK | ||
|- | |- | ||
| NielsenTVOSAppSDK | | NielsenTVOSAppSDK | ||
|} | |} | ||
=== Regional Builds === | === Regional Builds === | ||
(For 'kids' apps, please use the NoId framework (EG: NielsenAGFNoIdAppSDK, NielsenAGFNoIdTVOSAppSDK) | (For 'kids' apps, please use the NoId framework (EG: NielsenAGFNoIdAppSDK, NielsenAGFNoIdTVOSAppSDK) | ||
{| class="wikitable" style="width: | {| class="wikitable" style="width: 30%;" | ||
|- style="background-color:#efefef;" | |- style="background-color:#efefef;" | ||
! App Flavor Name | ! App Flavor Name | ||
|- | |- | ||
| NielsenAGFAppSDK | | NielsenAGFAppSDK | ||
|- | |- | ||
| NielsenAGFNoAdAppSDK | | NielsenAGFNoAdAppSDK | ||
|- | |- | ||
| NielsenAGFNoAdTVOSAppSDK | | NielsenAGFNoAdTVOSAppSDK | ||
|- | |- | ||
| NielsenAGFNoIdAppSDK | | NielsenAGFNoIdAppSDK | ||
|- | |- | ||
| NielsenAGFNoIdTVOSAppSDK | | NielsenAGFNoIdTVOSAppSDK | ||
|- | |- | ||
| NielsenAGFTVOSAppSDK | | NielsenAGFTVOSAppSDK | ||
|} | |} | ||
Revision as of 19:54, 2 October 2020
The Nielsen AppSDK can either be downloaded directly or can be integrated directly within an application through the use of a CocoaPod or Gradle.
How to install Nielsen SDK in iOS
CocoaPods is a dependency manager for Swift and Objective-C Cocoa projects. It has over 30 thousand libraries and is used in over 1.9 million apps. The Nielsen SDK now uses this distribution framework for improved version management and provides a Static and Dynamic Framework.
Initial Configuration
The Nielsen SDK integration requires Cocoapods.
- The Dynamic Framework which requires Cocoapods Version 1.6.1 or higher.
- The Static Framework requires Cocoapods version 1.4.0. or higher.
The full installation guide for this framework is provided on the Getting Started page, and how to set up the Podfile is mentioned in Using Cocoapods page.
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
Within this file you need to add your credentials in the following format:
machine raw.githubusercontent.com
login <Nielsen App SDK client>
password <Auth token>
Please do not upload any file to github or bitbucket containing the credentials above.
This will automatically lock your access.
Credentials
Obtain credentials → here ←
Verify version of Cocoapods
First verify that Cocoapods is installed.
pod --version
If it is not, then install.
Install via gem
sudo gem install cocoapods
Install using homebrew
brew install cocoapods
Add Cocoapod repository
Dynamic Framework (Cocoapods 1.6.1+)
If using Dynamic Framework (preferred approach), from the command line, type the following:
pod repo add NielsenAppSDK https://github.com/NielsenDigitalSDK/nielsenappsdk-ios-specs-dynamic.git
Make sure you run the pod init command in your **project's directory.**
pod init
You now need to slightly modify the PodFile that was created in this directory. From the command line, you can use vi or vim to edit.
The following must be in the PodFile:
Podfile
platform :ios, '11.0'
source 'https://github.com/NielsenDigitalSDK/nielsenappsdk-ios-specs-dynamic.git'
target 'YourProjectsNameHere' do
use_frameworks!
#Pods for ApplicationTarget
pod 'NielsenAppSDK'
end
For Static Framework (Cocoapods 1.4+)
From the command line, type the following:
pod repo add NielsenAppSDK https://github.com/nielsendigitalsdk/nielsenappsdk-ios-specs.git
Make sure you run the pod init command in your **project's directory.**
pod init
You now need to slightly modify the PodFile that was created in this directory. From the command line, you can use vi or vim to edit.
The following must be in the PodFile:
Podfile
platform :ios, '11.0'
source 'https://github.com/NielsenDigitalSDK/nielsenappsdk-ios-specs.git'
target 'YourProjectsNameHere' do
#Pods for ApplicationTarget
pod 'NielsenAppSDK'
end
NOTE: You can have multiple pods within the Podfile
To select a specific version of the Nielsen SDK, just append the build number. For example, this line is requesting build 7.1.0.0:
pod 'NielsenAppSDK','7.1.0.0'
If using version control, a warning message will be displayed within the console trace during the build of your app,
and it will show all sdk versions released to-date, allowing a developer to select a more recent build if desired.
Execute Install
Once that has been edited, you can now execute the install:
pod install
Cocoapods will automatically create a new file with extension “.xcworkspace”. From this moment, that file should be used for using the target project instead of previous one with extension “.xcodeproj”. Inside of this workspace you will see “Pods” target which will include ready to use NielsenAppApi framework.
Open the file with the extension of .xcworkspace
file using Xcode.
Pod Versions
The following Pod versions are now available: (For 'kids' apps, please use the NoId framework (EG: NielsenNoIdAppSDK, NielsenNoIdTVOSAppSDK)
App Flavor Name |
---|
NielsenAppSDK |
NielsenNoAdAppSDK |
NielsenNoAdTVOSAppSDK |
NielsenNoIdAppSDK |
NielsenNoIdTVOSAppSDK |
NielsenTVOSAppSDK |
Regional Builds
(For 'kids' apps, please use the NoId framework (EG: NielsenAGFNoIdAppSDK, NielsenAGFNoIdTVOSAppSDK)
App Flavor Name |
---|
NielsenAGFAppSDK |
NielsenAGFNoAdAppSDK |
NielsenAGFNoAdTVOSAppSDK |
NielsenAGFNoIdAppSDK |
NielsenAGFNoIdTVOSAppSDK |
NielsenAGFTVOSAppSDK |
Additional Resources
For more information on CocoaPods or How to set up the Profile in the Using Cocoapods page.