Does WillTerminate method fire when stopping an application in MonoDevelop - xamarin.ios

I am trying to find out if the WillTerminate method of the UIApplicationDelegate class fire when the application is terminated in MonoDevelop? I ask this because I have set up my application to close the database connections when the application terminates, and it does not seem like this is happening when I stop the application from MonoDevelop.
I know that iphone applications should not have a "close" function, but is there some way of simulating an application close on the simulator so I can test the execution of the WillTerminate method?

No it does not, it forcibly exits the application. To test the behaviour you can add:
<key>UIApplicationExitsOnSuspend</key>
<true/>
To your Info.plist, and click the home button.

Related

onUpdateAvailable and onInstall events. How do they work?

How do the runtime.onUpdateAvailable and runtime.onInstall events follow each other?
(1°Q) First, can they coexist in the same background script?
The documentation states that onUpdateAvailable can be useful for
postpone an update for example, when you are in the middle of some important operation that we don't
want it to be interrupted.
If the extension has registered an event handler for onUpdateAvailable, then the update will be applied the next time the extension is reloaded.
This happens when:
we restart the browser
the extension is disabled and then re-enabled
the extension reloads itself by calling the runtime.reload method
So I imagine that the onUpdateAvailable event handler that will be executed is the one referring to the old version.
(2nd Q) Am I right?
Now I ask myself:
(3nd Q) When the extension is reloaded later in one of the above ways, will the onInstall event be honored or ignored?
(4th Q) Is there a way to test this behavior by myself, specifically I am referring to the onUpdateAvailable event?
Regardless of onUpdateAvailable's presence, the extension will always be updated when the background script is inactive (i.e. it doesn't run), in particular when it's reloaded or re-enabled.
An onUpdateAvailable listener was necessary for a persistent background script in ManifestV2 because without this listener Chrome would automatically terminate the extension and update it. Chrome did it to prevent an outdated extension continuously running for days/months.
In ManifestV3 the background script can't be persistent by design, so Chrome won't restart an extension even if it doesn't have this event listener. However, you may want to use this event anyway if you connect to a native app via chrome.runtime.connectNative in Chrome 105 or newer because it makes the background run forever (i.e. it becomes persistent) or if you prolong its lifetime artificially.
The onUpdateAvailable and onInstalled listeners can co-exist and are triggered independently.
onUpdateAvailable (of the current version) runs before updating,
onInstalled (of the new version) runs afterwards.
To test the event in case a newer version is present in the web store, press the Update button in chrome://extensions page or call chrome.runtime.requestUpdateCheck() in your extension.
To test the event independently of the web store, configure your extension to use local updates.

How can I force my node.JS Application to crash with a custom error message

I was thinking that on macOS, you get a cool crash reporter that shows up when an application crashes. I wanted to force that with my app, that has a "Test Crash" button in a Tray Menu application (electronJS), and show a custom error message. If not, just making the app freeze up/hang would be good.
I was thinking about running a resource-heavy command that got looped super fast but that might use all the computer resources and then it'd be the one that crashes.
Is there any way to do this without process.exit()?

Blueprism Application Modeller showing Launch instead of Identify when spying

I am using BluePrism v6.1.0 and I am trying to identify elements from a launched application in Application Modeller. (I used the Windows application type in the modeler configuration)
From some tutorials I saw, the launch button changes to Identify button after the app is launched, however, mine is still showing "Launch". Please see screenshot below
screenshot
You need to launch the application from the application modeller, not on your own.
Since you are using Windows 10, the built in applications are use differently than normal in windows 7. Here is how you can add the code to make it work with your system Screenshot. Also for future applications use this code in Windows Power Shell to get information about the application you wanted to work with in Window 10 : "Get-AppxPackage"
Not fully explained here but this can also mean not only is the app not launched but blueprism can't "see" the app is launched. Two ways to solve this so close the application and relaunch it then it will change to identify, OR you can attach the current instance of the object to the running application.
Either way the outcome is you're making blueprism see the active application so it will change the launch to an identify option.
Edit: watch out as well, if you connect your application to blue prism and then detach it blue prism will no longer see the running application hence will revert the identify option into a launch option.

Liferay startup events explanation

1) I was trying to create a portal startup hook, and was overwriting a startup action. The wording in application.startup.events description was a bit vague: it says that this event runs once for every web site instance of the portal that initializes. Does 'web site instance of the portal' mean the same as 'portal' instance?
2) Whenever I redeploy my hook, my application startup event action gets called. Does it mean that the portal instance reinitializes? If so, why don't I observe the same behavior if I redeploy other plugins? (When I redeploy other plugins, startup event action doesn't get called)
3) When I try to overwrite global.startup.events instead of application.startup.events in my hook, my startup action never gets called (I inserted some print statements into the startup method and restarted the server). How can this behavior be explained?
I'd appreciate if you answer even partly, since it would still benefit me and probably the community.
Thanks in advance
A hook is deployed as a web application. Thus an application.startup.events-configured action will fire when the hook gets deployed. AFAIK it will be called with all available instance ids (technically companyId). It seems that the wording in the documentation is unfortunate. However, as all webapplications deploy independent of each other, this is the best effort that's available. And if you update your hook's code and redeploy it, you might want to run the changed startup event.
global.startup.events can not be configured in a hook, thus you see no activity - it's strictly ignored.

DetourCreateProcessWithDllEx replacement

I am trying to hook detours dll into my application it works but my application launches another exe. I can't attach to that exe because it says launch previous application and closes.
What I am trying to ask is, is there something in detours API that allows me to hook onto a process?

Resources