Skip to content

Everyplay integration to iOS game

MAKOTO SUGANO edited this page Jan 20, 2014 · 1 revision

Everyplay is a tool that allows players of your game to easily record game replays, directly within your game, and share them with friends on the Everyplay network and to other social networks. This document shows you how to integrate the Everyplay recording to your iOS game at the native Objective-C level.

There are separate documentations available for game engines that we provide ready-to-use recording support. However, in most cases the steps in this document need to be completed prior to any other development work so we heavily recommend reading this document before moving on. Ready-to-use recording support is available for:

Everyplay requires iOS 5 or later, but can be linked to an app with deployment target set to 4.3. When running on platforms older than iOS 5, Everyplay sets all of it's public methods to no-op state.

Everyplay SDK also uses ARC (Automatic Reference Counting) featured in recent Xcode releases. We recommend using Xcode 4.4 or later, drop armv6 support and setting iOS deployment target to 4.3 or later.

Hardware-wise, Everyplay SDK is built with armv7, armv7s and iOS simulator support. You can test all Everyplay functionality on a simulator environment, except the actual recording part itself.

All iDevices are at least armv7 starting with the iPhone 3GS, but performance improves with each hardware generation and the recording performance on older devices (pre-A5 dual core) can hinder the gameplay experience, but the actual results are dependant on several factors so your results may vary. If you don't have access to older hardware, it might be wise to disable recording functionality on devices with single-core CPU or limited memory.

You can, however, use Everyplay for other purposes - you can build your own custom views that leverage the Everyplay API to show the latest gameplay recording from your game, tie them together with highscores to build a video-based leaderboard, etc. The video recording is just a portion of the Everyplay service, and even the users with hardware limitations can browse and view videos created by other players of the game.

To integrate Everyplay, you need to complete the following steps:

  1. Import Everyplay framework and bundle to your Xcode project
  2. Configure the required information (such as your game's client id and secret)
  3. Add hooks to the Everyplay to start and stop the recording in the correct positions in your game
  4. Design and implement an integration point to your game to prompt users to share created videos

Obtaining and Unpacking the Everyplay SDK

If you have not yet done so, download the Everyplay SDK. This package contains three things:

  • The Everyplay .unitypackage
  • The Everyplay SDK .framework file
  • The Everyplay SDK .bundle file

The first file is only required for Unity3d development, the framework and bundle files are generic and shared across all iOS development.

Installation

Drag Everyplay.framework and Everyplay.bundle to your project

Select your build target and check Linked Frameworks and Libraries from the Summary tab, ensure you link against at least these frameworks:

  • AdSupport (iOS 6+, set to Optional link for pre-iOS 6 compatibility)
  • AssetsLibrary
  • AudioToolbox
  • AVFoundation
  • CoreGraphics
  • CoreImage (iOS 5+, set to Optional link for pre-iOS 5 compatibility)
  • CoreMedia
  • CoreVideo
  • Foundation
  • MessageUI
  • MobileCoreServices
  • OpenGLES
  • QuartzCore
  • Security
  • Social (iOS 6+, set to Optional link for pre-iOS 6 compatibility)
  • StoreKit
  • SystemConfiguration
  • Twitter (iOS 5+, set to Optional link for pre-iOS 5 compatibility)
  • UIKit

That's it, you should be ready to code!

Next Steps

After you've set everything up properly, it's time to record the gameplay in your game! For beginners, we recommend going through the example tutorial where we'll integrate Everyplay recording to a custom EAGLView implementation:

If you're using a game engine with ready-to-use support, you can directly jump to platform-specific documentation:

Other reading:

Clone this wiki locally