Skip to content

urbanairship/ua-unity-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

1538438 · Dec 17, 2024
Dec 17, 2024
Feb 8, 2024
Aug 15, 2017
Dec 19, 2023
Feb 8, 2024
Feb 9, 2024
Feb 1, 2024
Feb 1, 2024
Dec 22, 2023
Feb 1, 2024
Dec 22, 2023
Mar 14, 2024
Jan 26, 2015
Feb 21, 2019
May 23, 2018
Apr 28, 2020
Feb 1, 2024
Dec 22, 2023
Feb 29, 2020
Mar 11, 2020
Mar 11, 2020
Sep 28, 2017
Sep 20, 2016

Repository files navigation

Airship Unity Plugin

A Unity plugin that integrates the iOS and Android Airship SDK.

Requirements

  • Unity 5+
  • iOS: Xcode 11+
  • iOS: Minimum deployment target must be iOS 11+
  • Android: Android SDK installed and updated (requires Android MinSdkVersion = 16)
  • Android: Using Android SDK manager, install 28+. If Custom Gradle Template is used, the gradle template needs to be configured to use API VERSION 28+.

Resources:

Third Party Packages

Quickstart

  1. Download the latest unitypackage
  2. Import Airship unitypackage: In Unity, Assets -> Import Package -> Custom Package
  3. Configure Airship: In Unity, Window -> Urban Airship -> Settings

An example script is provided in 'Scripts/UrbanAirshipBehaviour.cs'. Import into your app's scripts and attach it to a game object in each scene. The script shows a very basic integration with Airship.

iOS

Enable Push Notifications in the project editor's Capabilities pane:

Xcode's Project Editor Capabilities Pane

To add support for iOS 10 notification attachments, you will need to create a notification service extension. Detailed steps can be found here.

Android

Download google-services.json into the Assets directory from the application's firebase console.

If proguard is enabled, add Airship settings to the proguard-user.txt file.

-keep public class com.urbanairship.unityplugin.UnityPlugin
-keepclassmembers class com.urbanairship.unityplugin.UnityPlugin {
  public <methods>;
  public <fields>;
  static <methods>;
}