public static void UpdatePluginSettings() { if (!IsInstalled || !IsUpToDate) { return; } ChnageDefineState(IOSNotificationController_Path, "PUSH_ENABLED", IOSNativeSettings.Instance.EnablePushNotificationsAPI); ChnageDefineState(DeviceTokenListener_Path, "PUSH_ENABLED", IOSNativeSettings.Instance.EnablePushNotificationsAPI); ChnageDefineState(GameCenterManager_Path, "GAME_CENTER_ENABLED", IOSNativeSettings.Instance.EnableGameCenterAPI); ChnageDefineState(GameCenter_TBM_Path, "GAME_CENTER_ENABLED", IOSNativeSettings.Instance.EnableGameCenterAPI); ChnageDefineState(GameCenter_RTM_Path, "GAME_CENTER_ENABLED", IOSNativeSettings.Instance.EnableGameCenterAPI); ChnageDefineState(IOSNativeMarketBridge_Path, "INAPP_API_ENABLED", IOSNativeSettings.Instance.EnableInAppsAPI); ChnageDefineState(IOSStoreProductView_Path, "INAPP_API_ENABLED", IOSNativeSettings.Instance.EnableInAppsAPI); ChnageDefineState(ISN_Security_Path, "INAPP_API_ENABLED", IOSNativeSettings.Instance.EnableInAppsAPI); ChnageDefineState(iAdBannerControllerr_Path, "IAD_API", IOSNativeSettings.Instance.EnableiAdAPI); ChnageDefineState(iAdBanner_Path, "IAD_API", IOSNativeSettings.Instance.EnableiAdAPI); ChnageDefineState(IOSSocialManager_Path, "SOCIAL_API", IOSNativeSettings.Instance.EnableSocialSharingAPI); ChnageDefineState(IOSCamera_Path, "CAMERA_API", IOSNativeSettings.Instance.EnableCameraAPI); ChnageDefineState(IOSVideoManager_Path, "VIDEO_API", IOSNativeSettings.Instance.EnableMediaPlayerAPI); ChnageDefineState(ISN_MediaController_Path, "VIDEO_API", IOSNativeSettings.Instance.EnableMediaPlayerAPI); ChnageDefineState(ISN_ReplayKit_Path, "REPLAY_KIT", IOSNativeSettings.Instance.EnableReplayKit); if (!IOSNativeSettings.Instance.EnableGameCenterAPI) { PluginsInstalationUtil.RemoveIOSFile("ISN_GameCenter"); } else { FileStaticAPI.CopyFile(PluginsInstalationUtil.IOS_SOURCE_PATH + "ISN_GameCenter.mm.txt", PluginsInstalationUtil.IOS_DESTANATION_PATH + "ISN_GameCenter.mm"); } if (!IOSNativeSettings.Instance.EnableInAppsAPI) { PluginsInstalationUtil.RemoveIOSFile("ISN_InApp"); } else { FileStaticAPI.CopyFile(PluginsInstalationUtil.IOS_SOURCE_PATH + "ISN_InApp.mm.txt", PluginsInstalationUtil.IOS_DESTANATION_PATH + "ISN_InApp.mm"); } if (!IOSNativeSettings.Instance.EnableiAdAPI) { PluginsInstalationUtil.RemoveIOSFile("ISN_iAd"); } else { FileStaticAPI.CopyFile(PluginsInstalationUtil.IOS_SOURCE_PATH + "ISN_iAd.mm.txt", PluginsInstalationUtil.IOS_DESTANATION_PATH + "ISN_iAd.mm"); } if (!IOSNativeSettings.Instance.EnableCameraAPI) { PluginsInstalationUtil.RemoveIOSFile("ISN_Camera"); } else { FileStaticAPI.CopyFile(PluginsInstalationUtil.IOS_SOURCE_PATH + "ISN_Camera.mm.txt", PluginsInstalationUtil.IOS_DESTANATION_PATH + "ISN_Camera.mm"); } if (!IOSNativeSettings.Instance.EnableSocialSharingAPI) { PluginsInstalationUtil.RemoveIOSFile("ISN_SocialGate"); } else { FileStaticAPI.CopyFile(PluginsInstalationUtil.IOS_SOURCE_PATH + "ISN_SocialGate.mm.txt", PluginsInstalationUtil.IOS_DESTANATION_PATH + "ISN_SocialGate.mm"); } if (!IOSNativeSettings.Instance.EnableMediaPlayerAPI) { PluginsInstalationUtil.RemoveIOSFile("ISN_Media"); } else { FileStaticAPI.CopyFile(PluginsInstalationUtil.IOS_SOURCE_PATH + "ISN_Media.mm.txt", PluginsInstalationUtil.IOS_DESTANATION_PATH + "ISN_Media.mm"); } if (!IOSNativeSettings.Instance.EnableReplayKit) { PluginsInstalationUtil.RemoveIOSFile("ISN_ReplayKit"); } else { FileStaticAPI.CopyFile(PluginsInstalationUtil.IOS_SOURCE_PATH + "ISN_ReplayKit.mm.txt", PluginsInstalationUtil.IOS_DESTANATION_PATH + "ISN_ReplayKit.mm"); } if (!IOSNativeSettings.Instance.EnableSoomla) { ChnageDefineState(ISN_Soomla_Path, "SOOMLA", IOSNativeSettings.Instance.EnableSoomla); PluginsInstalationUtil.RemoveIOSFile("ISN_Soomla"); } else { if (FileStaticAPI.IsFileExists("Plugins/IOS/libSoomlaGrowLite.a")) { ChnageDefineState(ISN_Soomla_Path, "SOOMLA", IOSNativeSettings.Instance.EnableSoomla); FileStaticAPI.CopyFile(PluginsInstalationUtil.IOS_SOURCE_PATH + "ISN_Soomla.mm.txt", PluginsInstalationUtil.IOS_DESTANATION_PATH + "ISN_Soomla.mm"); } else { bool res = EditorUtility.DisplayDialog("Soomla Grow not found", "IOS Native wasn't able to find Soomla Grow libraryes in your project. Would you like to donwload and install it?", "Download", "No Thanks"); if (res) { Application.OpenURL(IOSNativeSettings.Instance.SoomlaDownloadLink); } IOSNativeSettings.Instance.EnableSoomla = false; UpdatePluginSettings(); } } }
public static void UpdatePluginSettings() { if (!IsInstalled || !IsUpToDate) { return; } ChnageDefineState(IOSNotificationController_Path, "PUSH_ENABLED", IOSNativeSettings.Instance.EnablePushNotificationsAPI); ChnageDefineState(DeviceTokenListener_Path, "PUSH_ENABLED", IOSNativeSettings.Instance.EnablePushNotificationsAPI); ChnageDefineState(GameCenterManager_Path, "GAME_CENTER_ENABLED", IOSNativeSettings.Instance.EnableGameCenterAPI); ChnageDefineState(GameCenter_TBM_Path, "GAME_CENTER_ENABLED", IOSNativeSettings.Instance.EnableGameCenterAPI); ChnageDefineState(GameCenter_RTM_Path, "GAME_CENTER_ENABLED", IOSNativeSettings.Instance.EnableGameCenterAPI); ChnageDefineState(IOSNativeMarketBridge_Path, "INAPP_API_ENABLED", IOSNativeSettings.Instance.EnableInAppsAPI); ChnageDefineState(IOSStoreProductView_Path, "INAPP_API_ENABLED", IOSNativeSettings.Instance.EnableInAppsAPI); ChnageDefineState(ISN_Security_Path, "INAPP_API_ENABLED", IOSNativeSettings.Instance.EnableInAppsAPI); ChnageDefineState(iAdBannerControllerr_Path, "IAD_API", IOSNativeSettings.Instance.EnableiAdAPI); ChnageDefineState(iAdBanner_Path, "IAD_API", IOSNativeSettings.Instance.EnableiAdAPI); ChnageDefineState(IOSSocialManager_Path, "SOCIAL_API", IOSNativeSettings.Instance.EnableSocialSharingAPI); ChnageDefineState(IOSCamera_Path, "CAMERA_API", IOSNativeSettings.Instance.EnableCameraAPI); ChnageDefineState(IOSVideoManager_Path, "VIDEO_API", IOSNativeSettings.Instance.EnableMediaPlayerAPI); ChnageDefineState(ISN_MediaController_Path, "VIDEO_API", IOSNativeSettings.Instance.EnableMediaPlayerAPI); ChnageDefineState(ISN_ReplayKit, "REPLAY_KIT", IOSNativeSettings.Instance.EnableReplayKit); if (!IOSNativeSettings.Instance.EnableGameCenterAPI) { PluginsInstalationUtil.RemoveIOSFile("ISN_GameCenter"); } else { FileStaticAPI.CopyFile(PluginsInstalationUtil.IOS_SOURCE_PATH + "ISN_GameCenter.mm.txt", PluginsInstalationUtil.IOS_DESTANATION_PATH + "ISN_GameCenter.mm"); } if (!IOSNativeSettings.Instance.EnableInAppsAPI) { PluginsInstalationUtil.RemoveIOSFile("ISN_InApp"); } else { FileStaticAPI.CopyFile(PluginsInstalationUtil.IOS_SOURCE_PATH + "ISN_InApp.mm.txt", PluginsInstalationUtil.IOS_DESTANATION_PATH + "ISN_InApp.mm"); } if (!IOSNativeSettings.Instance.EnableiAdAPI) { PluginsInstalationUtil.RemoveIOSFile("ISN_iAd"); } else { FileStaticAPI.CopyFile(PluginsInstalationUtil.IOS_SOURCE_PATH + "ISN_iAd.mm.txt", PluginsInstalationUtil.IOS_DESTANATION_PATH + "ISN_iAd.mm"); } if (!IOSNativeSettings.Instance.EnableCameraAPI) { PluginsInstalationUtil.RemoveIOSFile("ISN_Camera"); } else { FileStaticAPI.CopyFile(PluginsInstalationUtil.IOS_SOURCE_PATH + "ISN_Camera.mm.txt", PluginsInstalationUtil.IOS_DESTANATION_PATH + "ISN_Camera.mm"); } if (!IOSNativeSettings.Instance.EnableSocialSharingAPI) { PluginsInstalationUtil.RemoveIOSFile("ISN_SocialGate"); } else { FileStaticAPI.CopyFile(PluginsInstalationUtil.IOS_SOURCE_PATH + "ISN_SocialGate.mm.txt", PluginsInstalationUtil.IOS_DESTANATION_PATH + "ISN_SocialGate.mm"); } if (!IOSNativeSettings.Instance.EnableMediaPlayerAPI) { PluginsInstalationUtil.RemoveIOSFile("ISN_Media"); } else { FileStaticAPI.CopyFile(PluginsInstalationUtil.IOS_SOURCE_PATH + "ISN_Media.mm.txt", PluginsInstalationUtil.IOS_DESTANATION_PATH + "ISN_Media.mm"); } if (!IOSNativeSettings.Instance.EnableReplayKit) { PluginsInstalationUtil.RemoveIOSFile("ISN_ReplayKit"); } else { FileStaticAPI.CopyFile(PluginsInstalationUtil.IOS_SOURCE_PATH + "ISN_ReplayKit.mm.txt", PluginsInstalationUtil.IOS_DESTANATION_PATH + "ISN_ReplayKit.mm"); } }