Skip to content

An example iOS game written in Swift that integrates the Skillz SDK

License

Notifications You must be signed in to change notification settings

skillz/skillz-swiftris-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Swiftris Example Skillz + Swift Project

This repository contains an example iOS game written in Swift that integrates the Skillz SDK. It is intended to supplement the documentation that walks users through the process of integrating an iOS game.

Credit for the original Swiftris belongs to Bloc. (Original Swiftris Repository)

Credit for the Swift 3 upgrade to Swiftris belongs to ccezar (Swiftris Swift 3.0 Commit)

Skillz integration of the project done by Rich Hung

Use governed by the MIT License.

Build Environment

This project integrated the Skillz SDK version 21.0.25. Check the Downloads page for the latest version.

The project was built on Xcode 10.1. Also, make sure you have the appropriate developer certificate and provisioning profiles so that it can be run on an iOS device. The provisioning profiles need to set the bundle name to br.com.swiftris.

If you are experiencing trouble, please email integrations@skillz.com with a detailed description of the issue you are encountering.

Commit Details

The commits in this repository have been organized to make the SDK integration easier to follow.

Commit 01: Swiftris

The first commit contains Swiftris without Skillz integration. This can be used to compare to the next commits.

Commit 02: Install the Skillz SDK

The second commit simply installs the Skillz SDK that was downloaded from the Skillz Developer Portal. This is done by:

  • Dragging the Skillz.framework file into your XCode project
  • Moving the SkillzBridgingHeader.h file into your project
  • Adding the Skillz.framework to both your Linked Libraries and Embedded Binaries build phases.
  • Setting your deployment target to 9.0
  • Adding the Skillz run script

(NOTE: Need to fix the commits to reflect the last 3 bullets. Embedded Binaries, deployment target, and run script were missed on the first pass and do not appear until the final commit)

Refer to the full instructions for more information.

At this point, the game is not integrated with the SDK and still compiles and runs normally.

Commit 03: Getting In and Out of the Skillz SDK

Finally, the Skillz SDK is integrated

  • Implementing the SkillzDelegate protocol in the AppDelegate class, so that the game is notified when a match will begin or end.
  • Modifying Main.storyboard and adding MainMenuViewController.swift to give the game a main menu screen
  • Reporting the user's final score when the match ends.
  • Making sure that gameplay relevant randomness (which blocks spawn) is tied to Skillz's random function

About

An example iOS game written in Swift that integrates the Skillz SDK

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published