public static void FinishedLaunching (UIApplication application, NSDictionary launchOptions) {
#if DEBUG
SystemLogger.Log (SystemLogger.Module.PLATFORM, "# Application is in DEBUG mode");
# else
SystemLogger.Log (SystemLogger.Module.PLATFORM, "# Application is in RELEASE mode (activating antidebugging techniques");
try {
AntiDebugging.Disable_gdb();
} catch (Exception ex) { }
#endif
// Add notification observer for "userdidtakescreenshot" event
UIApplication.Notifications.ObserveUserDidTakeScreenshot (delegate(object sender, NSNotificationEventArgs e) {
SystemLogger.Log (SystemLogger.Module.PLATFORM, "NOTIFICATIONS ObserveUserDidTakeScreenshot - " + e.Notification.Name);
IPhoneUtils.GetInstance().FireUnityJavascriptEvent("Appverse.UserDidTakeScreenshot", null);
});
// informs the UIApplication Weak delegates (if any) about the application loading finished event
var tsEnumerator = typedServices.GetEnumerator ();
while (tsEnumerator.MoveNext())
{
var typedService = tsEnumerator.Current;
if (typedService.Value is IWeakDelegateManager) {
string loadConfigFilePath = null;
try {
loadConfigFilePath = (typedService.Value as IWeakDelegateManager).GetConfigFilePath ();
if (loadConfigFilePath != null) {
loadConfigFilePath = IPhoneUtils.GetInstance().GetFileFullPath(loadConfigFilePath);
(typedService.Value as IWeakDelegateManager).ConfigFileLoadedData(IPhoneUtils.GetInstance().GetResourceAsBinary(loadConfigFilePath, true));
}
} catch (Exception ex) {
SystemLogger.Log (SystemLogger.Module.PLATFORM, "# Cannot load config file for module: " + loadConfigFilePath);
}
(typedService.Value as IWeakDelegateManager).FinishedLaunching (application, launchOptions);
}
}
}