Install Marmalade iOS framework

Before you can integrate the Skillz SDK into your Marmalade game, you must first properly add it to your project. For this and all future articles, we require the use of Marmalade 7.5p1 or higher.

 

Step 1: Add the Skillz extension to your project

First you’ll need to copy the Skillz Marmalade extension from the Marmalade/SkillzSdk folder inside the SDK download into the root directory of your Marmalade project.

Next, to add the Skillz Marmalade extension to your project you will need to edit your project’s build file. Depending on the configuration of your project, this could be either a .MKB file, if you are using a single project file, or a .MKF file, if you have configured your project as a subproject.

Open the file appropriate to your project in a text editor. First, you’ll have to add SkillzSDK as the last entry in your subprojects section. If this section is not present, you’ll need to create it. Here's an example:

subprojects
{
    derbh
    iwgx
    iwgraphics
    GameFramework
    SoundEngine
    s3eBackgroundMusic

    SkillzSDK
}

Next you’ll need to add Skillz.framework (and its enclosing "Frameworks" folder) to your projects Assets section. Doing so will ensure that the Frameworks foldder is copied into the applications bundle at build time.

If your project uses asset groups, then you'll want be sure that the Skillz assets are included in every deployment. For example, if your project is using the asset group Default, then the assets setion may look something like this:

assets
{
    [Default]
    <include "SKILLZASSETS">
}

Step 2: Set the Minimum iOS Version

Ensure that the Marmalade project is set to the correct minimum iOS version. This can be set by clicking on the Configurationdrop-down in the Hub, selecting Edit Current…, and setting the Minimum iOS version setting under the Basic tab. Skillz requires iOS 8.0 or higher.

Step 3: Sign the Skillz Framework

Because the Skillz framework is packaged as a dyanmic library that is separate from the application's binary, it needs to be digitally "signed" before it can be included in your application's bundle. Xcode usally signs embedded frameworks as part of its "Embed Binaries" build step, but the Xcode project that Marmalade generates does not (as of 8.3) include an embed frameworks build step. And although it would be possible to add such a step to the Xcode project, you would have to do so every time the Xcode project was regenerated.

A more straightforward approach is to sign the Skillz.framework directly from the command line. To do so you'll need to specify a signing identify - which for most projects would be either 'iPhone Development' for test builds, or 'iPhone Distribution" for App Store submissions. If you have configured your own set of signing identities, then use the one appropriate for your build.

To sign Skillz.framework, first open OS X's Terminal App. Then `cd` to the `SkillzSDK/incoming/Frameworks` folder and type:

codesign --force -s 'iPhone Developer' Skillz.framework

For app store builds, specify the 'iPhone Distribution' identity instead. Remember, you'll need to sign any updates to the Skillz SDK that you might install in the future.

Next Steps

After completing these steps, the Skillz SDK should be properly included in your project and you should be able to compile your game without errors.

The next step is to perform the actual integration!