Latest 3.3.1
Homepage https://github.com/warnerbros/cpe-manifest-ios-data
License Apache License, Version 2.0
Platforms ios 8.0
Dependencies SWXMLHash
Authors

iOS native object mapping for MovieLabs Cross-Platform Extras Manifest, Common Metadata, AppData and Style specs, compatible with CPEExperience for a full UI implementation.

Currently supported specs:

Installation

CocoaPods

CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:

$ gem install cocoapods

To integrate CPEData into your Xcode project using CocoaPods, specify it in your Podfile:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!

target '<Your Target Name>' do
    pod 'CPEData', '~> 3.0'
end

Then, run the following command:

$ pod install

Carthage

Carthage is a decentralized dependency manager for Cocoa applications.
To integrate CPEData into your Xcode project using Carthage, specify it in your Cartfile:

github "warnerbros/cpe-manifest-ios-data" ~> 3.0

Then, add CPEData.framework and SWXMLHash.framework to "Linked Frameworks and Libraries" and Carthage’s "copy-frameworks" script

Usage

Use the static load functions in CPEXMLSuite for a convenient way to initialize and parse all the supported spec files.

Providing URL objects

CPEXMLSuite.load(manifestXMLURL: manifestXMLURL, appDataXMLURL: appDataXMLURL, cpeStyleXMLURL: cpeStyleXMLURL) { (error) in
    if let error = error {
        // Respond to error case
    } else {
        // Respond to parsing completion event (ExperienceLauncher.launch)
    }
}

Providing Data objects

CPEXMLSuite.load(manifestXMLData: manifestXMLData, appDataXMLData: appDataXMLData, cpeStyleXMLData: cpeStyleXMLData) { (error) in
    if let error = error {
        // Respond to error case
    } else {
        // Respond to parsing completion event (ExperienceLauncher.launch)
    }
}

Development

Open Example/CPEDataExampleWorkspace.xcworkspace in Xcode to build and run the sample project, which allows you to specify your own XML file URLs to be parsed and mapped to the library’s native classes. The example project also provides a UI to explore the hierarchy of the parsed data:

Example hierarchy of parsed Manifest

Latest podspec

{
    "name": "CPEData",
    "version": "3.3.1",
    "summary": "iOS native object mapping for MovieLabs Cross-Platform Extras Manifest, Common Metadata, AppData and Style specs",
    "license": {
        "type": "Apache License, Version 2.0",
        "file": "LICENSE"
    },
    "homepage": "https://github.com/warnerbros/cpe-manifest-ios-data",
    "authors": {
        "Imran Saadi": "[email protected]"
    },
    "platforms": {
        "ios": "8.0"
    },
    "dependencies": {
        "SWXMLHash": [
            "~> 4.0"
        ]
    },
    "source": {
        "git": "https://github.com/warnerbros/cpe-manifest-ios-data.git",
        "tag": "3.3.1"
    },
    "source_files": [
        "Source/**/*.swift",
        "Source/*.swift"
    ]
}

Pin It on Pinterest

Share This