This repository contains the native iOS code of Open Measurement SDK, also known as OM SDK.
Files are organized as a standard iOS project for Xcode and Cocoapods.
The Xcode workspace which includes both
Contains the source code for the SDK.
Contains the header and info.plist for the dynamic framework.
Contains the source code for the unit tests.
Contains the source code for the iOS Reference App.
Contains the demo project template,
OM-Demo-Template.xcodeproj and other files which ship with OM SDK.
OM-Demo is intended for integrators to build and run after being copied into a distribution archive rather than for SDK engineers debugging the SDK and/or Reference app. SDK engineers should run
OM-TestApp in the
Contains the fullstack tests that begin with iOS app setup and are validated based on the events received by an OMID verification client.
Note: In order for these tests to run properly, the following JS OMID artifacts need to be copied into the
OM-FullstackApp/Assets/OMIDJS/ directory: (1) omsdk-v1.js (2) omid-session-client-v1.js (3) omid-verification-client-v1.js (4) omid-validation-verification-script-v1.js
Textual configuration files that supplement the settings in the
.xcodeproj file, including semantic version number and partner namespace.
Cocoapods configuration files.
All notable changes to the project are documented in the changelog. The format is based on Keep a Changelog.
Please see the detailed instructions in the docs directory.
Note: The remaining instructions in this file are for developers making changes to the OM SDK library. Developers who want to integrate OM SDK into their apps should download the namespaced builds from the IAB Tech Lab portal.
The OM SDK library is built as an Xcode project. The library does not have any external dependencies, but the tests make use of OCMock, which is installed via Cocoapods.
- Xcode 11.3 or later
- Cocoapods 1.8.4 or later — Follow the installation instructions at the Cocoapods website.
Prepare workspace with Cocoapods
In order to run unit tests, you need to install dependencies via Cocoapods. Open a shell in your local working directory and enter:
In order to run the test app, you need to:
- Download the latest
omsdk-v1.jsrelease from the IAB portal
- Copy it into
Building with Xcode
Build the SDK and run tests using Xcode.
AppVerificationLibrarytarget builds the library.
OMSDKtarget builds the dynamic framework.
AppVerificationLibrary-Teststarget performs the unit tests.
OM-TestApptarget builds both the reference app and the library dependency.
Building with Command Line
Build SDK as a Static Library
xcodebuild build \ -workspace AppVerificationLibrary.xcworkspace \ -scheme AppVerificationLibrary
Build SDK as a Dynamic Framework
xcodebuild build \ -workspace AppVerificationLibrary.xcworkspace \ -scheme OMSDK
Run SDK tests
xcodebuild test \ -workspace AppVerificationLibrary.xcworkspace \ -scheme AppVerificationLibrary \ -destination 'platform=iOS Simulator,name=iPhone 11,OS=14.2'
Build Reference App
xcodebuild build \ -workspace AppVerificationLibrary.xcworkspace -scheme OM-TestApp \ -configuration Debug \ -destination 'platform=iOS Simulator,name=iPhone 11,OS=14.2' \ SYMROOT=build
Run Reference App in Simulator
open /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app # ... wait until simulator is launched ... xcrun simctl install booted ./build/Debug-iphonesimulator/OM-TestApp.app xcrun simctl launch booted com.iabtechlab.OM-TestApp
The documention for the public OMID API is generated with the tool Jazzy.
jazzy --objc --author IAB \ --sdk iphonesimulator \ --umbrella-header AppVerificationLibrary/OMIDImports.h \ --framework-root AppVerificationLibrary \ --module OMSDK \ --module-version 1.3 \ --undocumented-text '' \ --output jazzy