iOS Static Framework Setup
From Engineering Client Portal
Configuring Xcode Development Environment for Static Framework
The first step is to ensure that the following frameworks and libraries are imported into the Frameworks folder of the Xcode project before creating an instance of the Nielsen App SDK object.
- Nielsen Analytics framework makes use of a number of functions in this library.
- libc++.tbd (as SDK contains Objective C++ source file)
- Alternatively, include -lstdc++ in Build Settings → Other Linker Flag of the Xcode project
- Extract “NielsenAppApi.Framework” from the Nielsen App SDK sample app and copy it to Frameworks folder of the Xcode project.
- Add the code
-#import NielsenAppApi/NielsenAppApi.hto the View Controller’s header file.
Ensure that the following are included in the Linked Frameworks and Libraries list (located in the project’s Summary settings).
- Nielsen App SDK
- iOS security framework
To import a set of Objective-C files in the same app target as your Swift code, you rely on an Objective-C bridging header to expose those files to Swift. Xcode offers to create this header file when you add a Swift file to an existing Objective-C app, or an Objective-C file to an existing Swift app.
- Select File/New File/Objective-C File
- Xcode will prompt you to create a bridging header.
Once this file has been created, you need to add the following:
Add the code
to the View Controller’s header file.