Upgrading to SDK Version 23.x
Platform Specific Instructions
Unity Instructions for 23.x
WARNING
This version of the Skillz SDK cannot be used in new apps as of April 2020, and it cannot be used in app updates as of December 2020. This is due to Apple's deprecation of
UIWebView
. Details of the deprecation on Apple Developer NewsPlease upgrade to Skillz v25 as soon as possible. Version 25 removes the deprecated UIWebView code.
This document is for developers who have previously integrated v22.x of the Skillz Unity SDK and want to update their integration using the v23.x release.
Before You Upgrade
v23.x of the Skillz SDK was tested with Unity 2018.3, so it is recommended that you upgrade to Unity 2018.3 and above for expected behavior.
Permissions Note
Due to Android now being built with Android SDK 28, your app will ask for permissions at runtime, rather than at install time. Unity typically operates by asking for all possible permissions on the first launch of your app, and this can be overwhelming/offputting to your users. Refer to these instructions on how to prompt for only necessary permissions at runtime.
Instructions
Delete the Assets/Skillz folder in Unity
Make sure to save any custom code you wrote in these Skillz files for safe keeping. In your Unity project, delete the Skillz folder located within Assets in your Unity project.
Import the New Unity package
With your Unity project open, double-click on the Unity package, skillz_unity_crossplatform.unitypackage
, found inside the downloaded Unity SDK.
Ensure Skillzdelegate Game Object Has Your Game ID and a SkillzDelegate Script
If a SkillzDelegate script is no longer attached to the game object, you can simply attach the SkillzDelegate
script that came with the downloaded Unity SDK. You can also delete the SkillzDelegate gameobject and regenerate it again by clicking on Skillz > Generate Delegate in the Unity header toolbar.
Set the Skillz Orientation
The Skillz Delegate script in the SkillzDelegate game object now has a Skillz Orientation picker. You must pick either Portrait or Landscape to match the orientation of your game.
The orientation setting is for Android only. For games that have mixed orientations, the orientation setting tells Skillz what orientation to set your game scene at when it is loaded at the start of a match. For instance, if the scene for your main menu is designed for Portrait mode, but your game scene is designed for Landscape, the orientation setting should be set to Landscape.
Delete Assets/Plugins Folder
Before deleting this folder, make sure to save any of the files you created. We need to delete this folder to ensure that the Android Manifest, build.gradle, and Proguard files used to build your Android project are up-to-date.
After saving your files for safekeeping and deleting this folder, regenerate the Android Manifest. You can do that by clicking on Skillz/Regenerate Android Manifest:
Change Android Build Settings
This step is only required if you plan to build for Android. You must be using Unity 2018.3 or newer to access the following settings.
Navigate to your Android Player Settings via Edit > Project Settings > Player > Android Icon. Change "Scripting Backend" to IL2CPP
. Under "Target Architectures" check the box next to ARM64
.
IL2CPP issues on Unity 2018
Some versions of Unity 2018 may contain errors in the Android IL2CPP implementation. If you are experiencing errors or crashes related to IL2CPP at runtime, you might find Unity 2019 more reliable.
Next Steps
You have updated your project to 23.x and are now able to re-export your projects to both iOS and Android. If you encounter a problem, please contact us with a detailed description of the issue you are encountering.
Custom Theming Warning
If your game takes advantage of our custom themed SDK feature, you will need to build an .ipa or .apk with the new SDK version, upload it to the Skillz Developer Console, and sync your game to Production. Prior to that, you may see artifacts within your custom theme.
iOS Instructions for 23.x
WARNING
This version of the Skillz SDK cannot be used in new apps as of April 2020, and it cannot be used in app updates as of December 2020. This is due to Apple's deprecation of
UIWebView
. Details of the deprecation on Apple Developer NewsPlease upgrade to Skillz v25 as soon as possible. Version 25 removes the deprecated UIWebView code.
This document is for developers who previously integrated v22.x of the Skillz iOS SDK and are looking to update their integration using the latest v23.x release.
Instructions
Re-Add Skillz.framework
Please download the newest Skillz.framework
from the Skillz Developer Console. Next, remove the older version of Skillz.framework
from your project. Now, add the Skillz.framework
file that was downloaded to your Xcode project. If you are unsure as to how to do that, this article explains it in more detail.
Your version of the Skillz iOS framework is now up-to-date.
Next Steps
If you encounter any problems, please contact us with a detailed description of the issue you are encountering.
Android Instructions for 23.x
This document is for developers who have previously integrated v22.x of the Skillz Android SDK and want to update their integration using the latest v23.x release of our SDK.
Instructions
Add a Skillz SDK Dependency
Point your app to the Skillz SDK version 23.x. In your build.gradle
file, update your Skillz dependency to be the latest SDK version. For example:
android {
dependencies {
implementation 'com.skillz.sdk:skillz-sdk-android:23.2.1'
}
}
Note
The newest version of the SDK can be found in Skillz's Maven Repository.
Reference Gradle 5.1+
If you plan on using Google's Maven repository, Gradle version 5.1 and above is required. As such, you will need to modify our build.gradle
file to reference v3.4.2 (or above) of the Gradle plugin. It usually resides in the buildscript
section:
buildscript {
dependencies {
classpath 'com.android.tools.build:gradle:3.4.2'
}
}
Refer to the official documentation to see which version of the plugin to reference for a different version of Gradle.
Change minSdkVersion, targetSdkVersion, and compileSdkVersion
You will need to modify your build.gradle
file so that the minSdkVersion
is 23, and both targetSdkVersion
and compileSdkVersion
are set to 28:
android {
compileSdkVersion 28
defaultConfig {
minSdkVersion 23
targetSdkVersion 28
}
}
Compiling for 64-bit Devices
The Skillz Android SDK now has direct support for 64-bit devices. To compile your app for a 64-bit device with Skillz, modify the ndk
section in your build.gradle
file to have arm64-v8a
and x86_64
entries:
android {
defaultConfig {
ndk {
abiFilters "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
}
}
}
Set the Game Orientation
You will need to let Skillz know what orientation your game is set to. In your AndroidManifest.xml
file, add the meta-data element below. NOTE: the value can either be "portrait" or "landscape".
<meta-data android:name="skillz_orientation" android:value="portrait" />
Next Steps
You have now updated your project to 23.x. If you encounter a problem, please contact us with a detailed description of the issue you are encountering.