Skip to content
This repository has been archived by the owner on May 17, 2024. It is now read-only.

Commit

Permalink
Release AppMetrica Push Unity Plugin 0.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
bamx23 committed Jan 31, 2017
0 parents commit dc5aaad
Show file tree
Hide file tree
Showing 38 changed files with 1,322 additions and 0 deletions.
103 changes: 103 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
### Unity ###
[Ll]ibrary/
[Tt]emp/
[Oo]bj/
ProjectSettings/

# Autogenerated VS/MD solution and project files
*.csproj
*.unityproj
*.sln
*.suo
*.tmp
*.user
*.userprefs
*.pidb
*.booproj

# Unity3D generated meta files
*.pidb.meta
*.meta

# Unity3D Generated File On Crash Reports
sysinfo.txt


### Objective-C ###
# Xcode
#
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
*.xccheckout
*.moved-aside
DerivedData
*.hmap
*.ipa
*.xcuserstate

# CocoaPods
#
Pods/


### MonoDevelop ###
#User Specific
*.userprefs
*.usertasks

#Mono Project Files
*.pidb
*.resources
test-results/


### Android ###
# Built application files
*.ap_

# Files for the Dalvik VM
*.dex

# Java class files
*.class

# Generated files
gen/

# Gradle files
.gradle/

# Local configuration file (sdk path, etc)
local.properties

# Proguard folder generated by Eclipse
proguard/

# Log Files
*.log

### Android Patch ###
gen-external-apklibs


### Java ###
*.class

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.war
*.ear

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*

.DS_Store
Binary file added AppMetricaPush.unitypackage
Binary file not shown.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# AppMetrica Push - Unity Plugin

## License
License agreement on use of Yandex AppMetrica SDK is available at [EULA site] [LICENSE].

## Documentation
Documentation could be found at [AppMetrica official site] [DOCUMENTATION].

## Changelog

### Version 0.1.0

* Initial release with iOS and Android native SDK *(iOS 0.4.0, Android 0.5.0)*

[LICENSE]: http://legal.yandex.ru/metrica_termsofuse/ "Yandex AppMetrica agreement"
[DOCUMENTATION]: https://tech.yandex.ru/metrica-mobile-sdk/doc/mobile-sdk-dg/push/unity-initialize-docpage/ "Yandex AppMetrica Push Unity Plugin documentation"
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
using UnityEngine;
using System.Collections;

public class AppMetricaPush : MonoBehaviour
{
private static bool _isInitialized = false;

private static IYandexMetricaPush _instance = null;
private static object syncRoot = new Object ();

public static IYandexMetricaPush Instance {
get {
if (_instance == null) {
lock (syncRoot) {
if (_instance == null) {
if (Application.platform == RuntimePlatform.IPhonePlayer) {
#if UNITY_IPHONE || UNITY_IOS
_instance = new YandexMetricaPushIOS();
#endif
} else if (Application.platform == RuntimePlatform.Android) {
#if UNITY_ANDROID
_instance = new YandexMetricaPushAndroid ();
#endif
}

if (_instance == null) {
_instance = new YandexAppMetricaPushDummy ();
}
}
}
}
return _instance;
}
}

private void Start ()
{
if (!_isInitialized) {
_isInitialized = true;
DontDestroyOnLoad (this.gameObject);
Instance.Initialize ();
}
}

private void Awake ()
{
if (_isInitialized) {
Destroy (this.gameObject);
}
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1001 &100100000
Prefab:
m_ObjectHideFlags: 1
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications: []
m_RemovedComponents: []
m_ParentPrefab: {fileID: 0}
m_RootGameObject: {fileID: 1000010494563946}
m_IsPrefabParent: 1
--- !u!1 &1000010494563946
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 4
m_Component:
- 4: {fileID: 4000010302120596}
- 114: {fileID: 114000011975497642}
m_Layer: 0
m_Name: AppMetricaPush
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &4000010302120596
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1000010494563946}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
--- !u!114 &114000011975497642
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1000010494563946}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 1a94682f766784207a09192463e59d90, type: 3}
m_Name:
m_EditorClassIdentifier:
Loading

0 comments on commit dc5aaad

Please sign in to comment.