Exemplo n.º 1
0
        /// <summary>
        /// Initialize the ItavioSDK for a target platform
        /// </summary>
        /// <param name="platform">Target platform</param>
        public static void initialize(itavioConfigPlatform platform)
        {
            itavioDbg.Log("Initializing Platform: " + platform.Name);
#if ITAVIO_ANDROID
            if (Instance.Plugin != null)
            {
                object[] args = new object[] { platform.SecretKeyID, platform.SecretKey, (int)platform.Environment };
                Instance.Plugin.Call <int>(INITIALIZE, args);
            }
#elif ITAVIO_IOS
            if (PluginExists)
            {
                itavioInitialize(platform.SecretKeyID, platform.SecretKey, (int)platform.Environment);
            }
#else   // Unsupported Platform
            if (Instance != null)
            {
                itavioDbg.LogWarning("Initialized Stub");
            }
#endif
        }
Exemplo n.º 2
0
        /// <summary>
        /// Initialize the ItavioSDK for a target platform
        /// </summary>
        /// <param name="platformName">Name of the target platform</param>
        public static void initialize(string platformName)
        {
            itavioConfigPlatform itavioPlatform = (Resources.Load(ITAVIO_CONFIG) as itavioConfig).GetPlatform(platformName);

            initialize(itavioPlatform);
        }