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.
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 [email protected] with a detailed description of the issue you are encountering.
The commits in this repository have been organized to make the SDK integration easier to follow.
The first commit contains Swiftris without Skillz integration. This can be used to compare to the next commits.
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 yourLinked Libraries
andEmbedded 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.
Finally, the Skillz SDK is integrated
- Implementing the
SkillzDelegate
protocol in theAppDelegate
class, so that the game is notified when a match will begin or end. - Modifying
Main.storyboard
and addingMainMenuViewController.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