• Stars
    star
    208
  • Rank 189,015 (Top 4 %)
  • Language
    C#
  • License
    Other
  • Created over 9 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

OneSignal is a free push notification service for mobile apps. This plugin makes it easy to integrate your Unity app with OneSignal. https://onesignal.com

OneSignal Unity SDK

A free email, sms, push notification and in app messaging solution for mobile applications built through Unity.

OneSignal provides a fully array of omni-channel messaging solutions across:

  • Push Notifications (mobile & web)
  • In App Messages
  • SMS
  • Email

And via many additional platforms. Check them all out!

Table of Contents

Requirements

  • A OneSignal Account if you do not already have one
  • Your OneSignal App ID which you can find under Settings > Keys & IDs
  • Unity 2018.4 or newer
  • iOS Builds: CocoaPods 1.11.3 or newer
  • In order to test push notifications you will need
    • An Android 4.0.3 or newer device or emulator with "Google Play services" installed
    • An iOS 9 or newer device (iPhone, iPad, or iPod Touch)

Push Notification Credentials

You must generate the appropriate credentials for the platform(s) you are releasing on:

Installation

There are two methods of installation available for the OneSignal Unity SDK:

Upgrading from 2.x.x to 3.x.x?
Please check out our migration guide.

Unity Asset Store (click to expand)
  1. Add the OneSignal Unity SDK as an available asset to your account by clicking Add to My Assets from our listing on the Unity Asset Store.

  2. Find the package waiting for you to download by clicking Open in Unity from that same page. This will open the Unity Editor and its Package Manager window.

  3. On the SDK's listing in the Editor click the Download button. When it finishes click Import.

    onesignal unity sdk in my assets

  4. A prompt to import all of the files of the OneSignal Unity SDK will appear. Click Import to continue and compile the scripts into your project.

  5. Navigate to Window > OneSignal (or follow the popup if upgrading) in the Unity Editor which will bring up a window with some final steps which need to be completed in order to finalize the installation. The most important of these steps is Import OneSignal packages.

    Depending on your project configuration and if you are upgrading from a previous version, some of these steps may already be marked as "completed"

    sdk setup steps window

  6. After importing the packages Unity will notify you that a new registry has been added and the OneSignal SDK Setup window will have refreshed with a few additional steps. Following these will finalize your installation of the OneSignal Unity SDK.

Unity Package Manager (click to expand)
  1. From within the Unity Editor navigate to Edit > Project Settings and then to the Package Manager settings tab.

    unity registry manager

  2. Create a New Scoped Registry by entering

    Name        npmjs
    URL         https://registry.npmjs.org
    Scope(s)    com.onesignal
    

    and click Save.

  3. Open the Window > Package Manager and switch to My Registries via the Packages: dropdown menu. You will see all of the OneSignal Unity SDK packages available on which you can then click Install for the platforms you would like to include. Dependencies will be added automatically.

  4. Once the packages have finished importing you will find a new menu under Window > OneSignal. Open it and you will find some final steps which need to be completed in order to finalize the installation.

    Depending on your project configuration and if you are upgrading from a previous version, some of these steps may already be marked as "completed"

    my registries menu selection

Platform Configuration

iOS

After building in Unity and exporting the XCode project follow these steps:

  1. To open your project ensure that you use the .xcworkspace file and not the .xcodeproj to open the project.

  2. Click on the Unity-iPhone project and its similarly named target and select the Signing & Capabilities tab.

  3. From here check Automatically manage signing, on the prompt click Enable Automatic, and select your Team.

    automatically manage signing

  4. Scroll down to App Groups and click on the refresh button.

    NOTE: You may have to press this a few times as it will ask you for each signing type.

    refresh app groups

  5. Repeat the same steps above but for the OneSignalNotificationServiceExtension target this time.

    extension signing and groups

  6. App Groups should now be provisioned for you going forward for your iOS bundle id, even on clean builds.

Android

Most of the Android setup was already handled during installation!

The only thing remaining is to setup your own notification icons. You can do this be replacing the example icons located at Assets/Plugins/Android/OneSignalConfig.plugin with your own. There is a complete guide for this in the plugin's README. See our Customize Notification Icons page for additional details.

Usage

You can find a complete implementation in our included example MonoBehaviour. Additionally we have included a sample scene which you can run to test out the SDK.

Initialization

Prefab

Located in the com.onesignal.unity.core package we've include a simple prefab which initializes OneSignal. You can easily find it using the Asset search bar to find OneSignalController.prefab and making sure to select All or In Packages for your search option. Drag the prefab into your very first scene, fill in the App Id, and you are immediately ready to go!

Code

To get started add the following code in an appropriate place such as the Start method of a MonoBehaviour early in your application's lifecycle.

// Replace 'YOUR_ONESIGNAL_APP_ID' with your OneSignal App ID from app.onesignal.com
OneSignal.Default.Initialize("YOUR_ONESIGNAL_APP_ID");

You are now ready to start sending and receiving notifications and in-app messages. For additional information please see our complete OneSignal Unity SDK docs.

API

See OneSignal's OneSignal SDK Reference page for a list of all available methods.

Change Log

See this repository's releases for a complete change log of every released version.

Support

Please visit this repository's Github issue tracker for feature requests and bug reports related specifically to the SDK.

For account issues and support please contact OneSignal support from the OneSignal dashboard.

License

Modified MIT License

More Repositories

1

react-native-onesignal

React Native Library for OneSignal Push Notifications Service
TypeScript
1,516
star
2

OneSignal-Flutter-SDK

OneSignal is a free push notification service for mobile apps. This plugin makes it easy to integrate your flutter app with OneSignal
Dart
582
star
3

OneSignal-Android-SDK

OneSignal is a free push notification service for mobile apps. This plugin makes it easy to integrate your native Android or Amazon app with OneSignal. https://onesignal.com
Java
573
star
4

OneSignal-iOS-SDK

OneSignal is a free push notification service for mobile apps. This plugin makes it easy to integrate your native iOS app with OneSignal. https://onesignal.com
Objective-C
464
star
5

OneSignal-Website-SDK

OneSignal is a push notification service for web and mobile apps. This SDK makes it easy to integrate your website with OneSignal Push Notifications. https://onesignal.com
TypeScript
377
star
6

OneSignal-Cordova-SDK

OneSignal is a free push notification service for mobile apps. This plugin makes it easy to integrate your Ionic, PhoneGap CLI, PhoneGap Build, Cordova, or Sencha Touch app with OneSignal. Supports Android, iOS, and Amazon's Fire OS platforms. https://onesignal.com
Java
238
star
7

onesignal-expo-plugin

The OneSignal Expo plugin allows you to use OneSignal without leaving the managed workflow. Developed in collaboration with SweetGreen.
TypeScript
101
star
8

OneSignal-Xamarin-SDK

OneSignal is a free push notification service for mobile apps. This plugin makes it easy to integrate your Xamarin app with OneSignal. https://onesignal.com
Objective-C
101
star
9

OneSignal-WordPress-Plugin

OneSignal is a free push notification service for web and mobile apps. This plugin makes it easy to integrate your website with OneSignal Push Notifications. https://onesignal.com
SCSS
75
star
10

serde-redis

Serde support for redis-rs
Rust
74
star
11

OneSignal-Gradle-Plugin

Use with OneSignal-Android-SDK to help integrate it into your Android Studio or Gradle project. https://onesignal.com
Groovy
64
star
12

react-onesignal

React OneSignal Module: Make it easy to integrate OneSignal with your React App!
TypeScript
63
star
13

L3-37

Yet another Tokio connection pooler. May cause robot uprising.
Rust
53
star
14

OneSignal-XCFramework

OneSignal is a free push notification service for mobile apps. This plugin makes it easy to integrate your native iOS app with OneSignal. https://onesignal.com. This Repository hosts OneSignal's XCFramework to be used with Swift Package Manager
Swift
18
star
15

onesignal-node-api

OneSignal Node Client
TypeScript
17
star
16

linebased

Drop-in TCP command server
Rust
16
star
17

onesignal-ruby-api

Ruby
13
star
18

cli

Command line tool for OneSignal power users. 1-step iOS SDK Integration. Now in Beta.
Ruby
13
star
19

onesignal-php-api

The official OneSignal API client for PHP
PHP
11
star
20

onesignal-vue

Vue OneSignal Plugin: Make it easy to integrate OneSignal with your Vue App!
TypeScript
10
star
21

OneSignal-DotNet-SDK

OneSignal is a free push notification service for mobile apps. This plugin makes it easy to integrate your .NET app with OneSignal. https://onesignal.com
Objective-C
10
star
22

onesignal-vue3

Vue 3 OneSignal Plugin: Make it easy to integrate OneSignal with your Vue App!
TypeScript
9
star
23

onesignal-python-api

Python
8
star
24

onesignal-dotnet-api

C#
8
star
25

onesignal-go-api

The official OneSignal API client for Go
7
star
26

sdks

OneSignal simplifies customer messaging. Integrate with ease today.
6
star
27

OneSignal-ChromeApp-SDK

OneSignal is a free push notification service for Chrome and mobile apps. This plugin makes it easy to integrate your Chrome App or Extension with OneSignal. https://onesignal.com
JavaScript
6
star
28

onesignal-java-api

Java
5
star
29

onesignal-ngx

OneSignal Angular
4
star
30

hyper-client-pool

For when one hyper::Client isn't enough
Rust
4
star
31

rust-service

A framework for writing system services
Rust
4
star
32

onesignal-rust-api

OneSignal Rust API Client SDK library
Rust
4
star
33

envgrep

Search through all process environment variables on linux
Rust
4
star
34

api

API Reference. OpenAPI Specification files for OneSignal's REST API.
Shell
3
star
35

OneSignal-Marmalade-SDK

OneSignal is a free push notification service for mobile apps. This extension makes it easy to integrate your Marmalade app with OneSignal. https://onesignal.com
C++
3
star
36

HttpWebPushDemo

OneSignal HTTP web push demo.
CSS
3
star
37

geocoder_rs

Rust
2
star
38

web-test-ext

Chrome extension to aid in web SDK tests by providing browser automation and settings controls.
JavaScript
2
star
39

OneSignal-Cordova-Dependencies-Compat

Use for Intel XDK with the onesignal-cordova-plugin-pgb-compat pluign. https://onesignal.com
2
star
40

NotificationActivityBackstackExample

Example showing Activity back stack started from notifications do NOT work correctly on some devices, such as Xiaomi
Java
2
star
41

openssl

C
2
star
42

thesis

Rust library for controling experimental refactors
Rust
2
star
43

help

Get help using and integrating OneSignal's powerful messaging service. Community and commercial support available.
1
star
44

OneSignal-Alexa-Nodejs-SDK

This plugin makes it easy to integrate your Amazon Alexa Skill with OneSignal. https://onesignal.com
JavaScript
1
star
45

docs

OneSignal Documentation. Community-driven documentation for users and developers.
1
star
46

zk-4lw

ZooKeeper Four Letter Word Client Library for Rust
Rust
1
star
47

OneSignal-Solar2D-SDK

OneSignal is a free push notification service for mobile apps. This plugin makes it easy to integrate your Solar2D app with OneSignal https://www.onesignal.com
Java
1
star
48

CustomPushOriginSubdomainDemo

Setup OneSignal web push notifications with notifications coming from https://my-push-subdomain.yoursite.com. This repo demos the behind-the-scenes code used for the actual "my-push-subdomain".yoursite.com.
HTML
1
star
49

examples

Customer Messaging made obvious. Tutorials and Recipes for using OneSignal. Sample applications that show the way.
1
star