This project is native plugin to receive push notification for the Unity3D.
You can customize the behavior when app receives a push notification.
+--------------------------+
| |
| Google Cloud Messaging |
| |
+--------------------------+
|
| 1. Push Notification from Google server
|
+-------------+-----------------+---------------------------------------------------------------+
| | | |
| V | |
| +--------------------------+ | +------------------+ |
| | | | 2. UnitySendMessage() | | |
| | androidpushplugin.jar |--+----------+-----------> | KiiPushPlugin.cs | |
| | | | | | | |
| +--------------------------+ | | +------------------+ |
| | | | |
| | | | |
| | | | 3. OnPushMessageReceived() |
| | | | |
| | | V |
| +--------------------------+ | | +------------------+ |
| | | | | | | |
| | UIApplication+KiiCloud.m |--+----------+ | YourUnityCode.cs | |
| | | | | | |
| +--------------------------+ | +------------------+ |
| 4 | |
| | | |
+-----[Native|Plugin Layer]-----+-----------------------[Unity Layer]---------------------------+
|
| 1. Push Notification from Apple server
|
+------------------------+
| |
| APNS |
| |
+------------------------+
- Plugin supports for iOS8 remote push registration as well as earlier iOS version on XCode 6 development environment.
- If your iOS development environment still using XCode 5.xx, you should remove iOS8 specific push API on
UnityPushPlugin/Assets/Plugins/iOS/DefaultPush.m
to avoid compile error. - For further explanations, please refer to documentation.
- implement a custom code by editing
UnityPushPlugin/Assets/Plugins/iOS/UIApplication+KiiCloud.m
- add
DllImport
statement toUnityPushPlugin/Assets/Plugins/KiiPushPlugin.cs
if you want to use the native method which you've implemented.
- import
AndroidPushPlugin/
project into the Eclipse. - implement a custom code.
- add code to call native code using AndroidJavaObject class to
UnityPushPlugin/Assets/Plugins/KiiPushPlugin.cs
.
$ sh build.sh
- KiiPushPlugin.unitypackage will be generated in bin directory.
If you have any questions, please feel free to ask at community.